diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2007-07-14 18:01:22 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2007-07-14 16:01:22 +0000 |
commit | 1dd3fc430e0c6a280b9ecc5c11268592d0dddae6 (patch) | |
tree | c5f729cf5dd7fd95e11ea8825898bf49cc1c1c72 /gcc/testsuite/gcc.dg | |
parent | 9c32f5071a25eef3799322c16d4b52990dcca608 (diff) | |
download | gcc-1dd3fc430e0c6a280b9ecc5c11268592d0dddae6.tar.gz |
20001013-1.c: Move to gcc.target/sparc.
* gcc.dg/20001013-1.c: Move to gcc.target/sparc.
* gcc.dg/20001101-1.c: Likewise.
* gcc.dg/20001102-1.c: Likewise.
* gcc.dg/20020116-2.c: Likewise.
* gcc.dg/20020416-1.c: Likewise.
* gcc.dg/sparc-constant-1.c: Likewise.
* gcc.dg/sparc-dwarf2.c: Likewise.
* gcc.dg/sparc-frame-1.c: Likewise.
* gcc.dg/sparc-getcontext-1.c: Likewise.
* gcc.dg/sparc-loop-1.c: Likewise.
* gcc.dg/sparc-reg-1.c: Likewise.
* gcc.dg/sparc-ret.c: Likewise.
* gcc.dg/sparc-trap-1.c: Likewise.
* gcc.dg/ultrasp10.c: Likewise.
* gcc.dg/ultrasp11.c: Likewise.
* gcc.dg/ultrasp1.c: Likewise.
* gcc.dg/ultrasp2.c: Likewise.
* gcc.dg/ultrasp3.c: Likewise.
* gcc.dg/ultrasp4.c: Likewise.
* gcc.dg/ultrasp5.c: Likewise.
* gcc.dg/ultrasp6.c: Likewise.
* gcc.dg/ultrasp7.c: Likewise.
* gcc.dg/ultrasp8.c: Likewise.
* gcc.dg/ultrasp9.c: Likewise.
* gcc.dg/splet-1.c: Delete.
From-SVN: r126641
Diffstat (limited to 'gcc/testsuite/gcc.dg')
25 files changed, 0 insertions, 849 deletions
diff --git a/gcc/testsuite/gcc.dg/20001013-1.c b/gcc/testsuite/gcc.dg/20001013-1.c deleted file mode 100644 index 8634a192820..00000000000 --- a/gcc/testsuite/gcc.dg/20001013-1.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run { target { sparc*-*-* && ultrasparc_hw } } } */ -/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */ - -extern void abort (void); -extern void exit (int); - -int l; - -int baz (double x) -{ - return l == 0; -} - -double bar (double x) -{ - return 1.0; -} - -double foo (double x) -{ - if (l == -1 || baz (x)) return x; - if (x < 0.0) - return bar (x); - else - return 0.0; -} - -union { - double d; - long long l; -} x = { l: 0x7ff8000000000000LL }, y; - -main () -{ - unsigned int fsr = 0; - __asm __volatile ("ld %0, %%fsr" : : "m" (fsr)); - y.d = foo (x.d); - __asm __volatile ("st %%fsr, %0" : "=m" (fsr)); - if (x.l != y.l || (fsr & 0x3ff)) - abort (); - exit (0); -} diff --git a/gcc/testsuite/gcc.dg/20001101-1.c b/gcc/testsuite/gcc.dg/20001101-1.c deleted file mode 100644 index 151a6cc19de..00000000000 --- a/gcc/testsuite/gcc.dg/20001101-1.c +++ /dev/null @@ -1,41 +0,0 @@ -/* { dg-do run { target { sparc*-*-* && ultrasparc_hw } } } */ -/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */ - -extern void abort (void); -extern void exit (int); - -int foo(double a, int b, int c, double *d, int h) -{ - int f, g; - double e; - -l: - f = (int) a; - a -= (double) f; - if (b == 1) - { - g = c; - f += g; - c -= g; - } - if (b == 2) - { - f++; - h = c; - } - if (!h) - { - for (g = 0; g <= 10; g++) - for (h = 0; h <= 10; h++) - e += d [10 + g - h]; - goto l; - } - return f & 7; -} - -int main() -{ - if (foo(0.1, 1, 3, 0, 1) != 3) - abort (); - exit (0); -} diff --git a/gcc/testsuite/gcc.dg/20001102-1.c b/gcc/testsuite/gcc.dg/20001102-1.c deleted file mode 100644 index 62266a38164..00000000000 --- a/gcc/testsuite/gcc.dg/20001102-1.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run { target { sparc*-*-* && ultrasparc_hw } } } */ -/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */ - -extern void abort (void); -extern void exit (int); - -int foo(double a, int b, int c, double *d, int h) -{ - int f, g; - double e; - -l: - f = (int) a; - a -= (double) f; - if (b == 1) - { - g = c; - f += g; - c -= g; - } - if (b == 2) - { - f++; - h = c; - goto l; - } - - asm volatile ("" : : : - "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", - "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", - "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", - "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31"); - - return f & 7; -} - -int main() -{ - if (foo(0.1, 1, 3, 0, 1) != 3) - abort (); - exit (0); -} diff --git a/gcc/testsuite/gcc.dg/20020116-2.c b/gcc/testsuite/gcc.dg/20020116-2.c deleted file mode 100644 index 04f5c6ee571..00000000000 --- a/gcc/testsuite/gcc.dg/20020116-2.c +++ /dev/null @@ -1,18 +0,0 @@ -/* This testcase ICEd on sparc64 because -mcpu=supersparc and implicit - -m64 resulted in MASK_V8 and MASK_V9 to be set at the same time. */ -/* { dg-do compile } */ -/* { dg-options "" } */ -/* { dg-options "-mcpu=supersparc" { target sparc*-*-* } } */ - -void bar (long *x, long *y); - -void foo (int x, long *y, long *z) -{ - int i; - - for (i = x - 1; i >= 0; i--) - { - bar (z + i * 3 + 1, y); - bar (z + i * 3 + 2, y); - } -} diff --git a/gcc/testsuite/gcc.dg/20020416-1.c b/gcc/testsuite/gcc.dg/20020416-1.c deleted file mode 100644 index db1a2617fcd..00000000000 --- a/gcc/testsuite/gcc.dg/20020416-1.c +++ /dev/null @@ -1,16 +0,0 @@ -/* PR bootstrap/6315 */ -/* { dg-do compile } */ -/* { dg-options "-O2" } */ -/* { dg-options "-O2 -mhard-quad-float" { target sparc*-*-* } } */ -/* { dg-options "-O2" { target sparclet*-*-* sparclite*-*-* sparc86x-*-* } } */ - -void bar (const char *, ...); - -void -foo (const char *x, long double y, int z) -{ - if (z >= 0) - bar (x, z, y); - else - bar (x, y); -} diff --git a/gcc/testsuite/gcc.dg/sparc-constant-1.c b/gcc/testsuite/gcc.dg/sparc-constant-1.c deleted file mode 100644 index bb4b1bce4f8..00000000000 --- a/gcc/testsuite/gcc.dg/sparc-constant-1.c +++ /dev/null @@ -1,12 +0,0 @@ -/* PR optimization/10876 */ -/* { dg-do compile { target sparc*-*-* } } */ - -/* Verify that adding the constant 4096 is turned - into substracting the constant -4096. */ - -int foo(int a) -{ - return a+4096; -} - -/* { dg-final { scan-assembler "sub" } } */ diff --git a/gcc/testsuite/gcc.dg/sparc-dwarf2.c b/gcc/testsuite/gcc.dg/sparc-dwarf2.c deleted file mode 100644 index d68cf620428..00000000000 --- a/gcc/testsuite/gcc.dg/sparc-dwarf2.c +++ /dev/null @@ -1,31 +0,0 @@ -/* PR target/10114 */ -/* Originator: James Troup <james@nocrew.org> */ -/* { dg-do compile { target sparc-*-linux* } } */ -/* { dg-options "-g -O1" } */ - -extern __inline double sqrt (double __x) -{ - register double __r; - __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x)); - return __r; -} - -static double our_skew, max_update_skew; - -static double Sqr(double x) -{ - return x*x; -} - -void REF_SetReference(double skew) -{ - double previous_skew, new_skew; - double old_weight, new_weight, sum_weight; - double delta_freq1, delta_freq2; - double skew1, skew2; - - previous_skew = our_skew; - skew1 = sqrt((Sqr(delta_freq1) * old_weight + Sqr(delta_freq2) * new_weight) / sum_weight); - skew2 = (previous_skew * old_weight + new_skew * new_weight) / sum_weight; - our_skew = skew1 + skew2; -} diff --git a/gcc/testsuite/gcc.dg/sparc-frame-1.c b/gcc/testsuite/gcc.dg/sparc-frame-1.c deleted file mode 100644 index 24fe390aedd..00000000000 --- a/gcc/testsuite/gcc.dg/sparc-frame-1.c +++ /dev/null @@ -1,12 +0,0 @@ -/* PR target/24284 */ -/* { dg-do compile { target sparc*-*-* } } */ -/* { dg-options "-O -g" } */ - -void do_run(void *ip) -{ - char dummy[8192]; - - __asm__("" : : "g"(dummy)); - - goto *ip; -} diff --git a/gcc/testsuite/gcc.dg/sparc-getcontext-1.c b/gcc/testsuite/gcc.dg/sparc-getcontext-1.c deleted file mode 100644 index 7b5939d17ed..00000000000 --- a/gcc/testsuite/gcc.dg/sparc-getcontext-1.c +++ /dev/null @@ -1,118 +0,0 @@ -/* PR middle-end/22127 */ -/* Testcase by <akr@m17n.org> */ - -/* { dg-do run { target sparc*-sun-solaris2.* } } */ -/* { dg-require-effective-target ilp32 } */ -/* { dg-options "-O" } */ - -typedef unsigned int size_t; -extern int printf(const char *, ...); -typedef unsigned char uint8_t; -typedef unsigned int uint32_t; -typedef unsigned int uint_t; -typedef char *caddr_t; -typedef int greg_t; -typedef greg_t gregset_t[19]; -struct rwindow { - greg_t rw_local[8]; - greg_t rw_in[8]; -}; -typedef struct gwindows { - int wbcnt; - greg_t *spbuf[31]; - struct rwindow wbuf[31]; -} gwindows_t; -struct fpu { - union { - uint32_t fpu_regs[32]; - double fpu_dregs[16]; - } fpu_fr; - struct fq *fpu_q; - uint32_t fpu_fsr; - uint8_t fpu_qcnt; - uint8_t fpu_q_entrysize; - uint8_t fpu_en; -}; -typedef struct fpu fpregset_t; -typedef struct { - unsigned int xrs_id; - caddr_t xrs_ptr; -} xrs_t; -typedef struct { - gregset_t gregs; - gwindows_t *gwins; - fpregset_t fpregs; - xrs_t xrs; - long filler[19]; -} mcontext_t; -typedef struct { - unsigned int __sigbits[4]; -} sigset_t; -typedef struct sigaltstack { - void *ss_sp; - size_t ss_size; - int ss_flags; -} stack_t; -typedef struct ucontext ucontext_t; -struct ucontext { - uint_t uc_flags; - ucontext_t *uc_link; - sigset_t uc_sigmask; - stack_t uc_stack; - mcontext_t uc_mcontext; - long uc_filler[23]; -}; -extern int getcontext(ucontext_t *); -extern int setcontext(const ucontext_t *); - -int flag; -ucontext_t cont; -int pad[100]; -typedef void (*fun_t)(int); -fun_t p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12; - -int global; - -extern void abort(void); - -void h1(int v) -{ - global = v; -} - -void h2(int v) -{ - if (v != 1) - abort(); -} - -void f(void) -{ - flag = 1; - setcontext(&cont); -} - -int g(void) -{ - int ret; - - flag = 0; - getcontext(&cont); - ret = flag; - if (ret == 0) { - h1 (flag); - p0 = p1 = p2 = p3 = p4 = p5 = p6 = p7 = p8 = h1; - f(); - p0(ret); p1(ret); p2(ret); p3(ret); p4(ret); p5(ret); p6(ret); p7(ret); p8(ret); - } - else { - h2 (flag); - } - return ret; -} - -int main(void) -{ - g(); - return 0; -} diff --git a/gcc/testsuite/gcc.dg/sparc-loop-1.c b/gcc/testsuite/gcc.dg/sparc-loop-1.c deleted file mode 100644 index 8d5f7519b03..00000000000 --- a/gcc/testsuite/gcc.dg/sparc-loop-1.c +++ /dev/null @@ -1,18 +0,0 @@ -/* PR optimization/10157 */ -/* Originator: Peter van Hoof <p.van-hoof@qub.ac.uk> */ -/* { dg-do compile { target sparc*-*-* } } */ -/* { dg-options "-O2 -ffast-math" } */ - -/* Verify that the loop optimizer doesn't - emit invalid reg-to-reg copy insns. */ - -void g() { - while(1) { - int i,n; - double p,r; - for( i=0; i < n; i++ ) - if( p > 1. ) - for( i=0; i < n; i++ ) - r += 2.; - } -} diff --git a/gcc/testsuite/gcc.dg/sparc-reg-1.c b/gcc/testsuite/gcc.dg/sparc-reg-1.c deleted file mode 100644 index 860094299a1..00000000000 --- a/gcc/testsuite/gcc.dg/sparc-reg-1.c +++ /dev/null @@ -1,11 +0,0 @@ -/* PR middle-end/20263 */ - -/* { dg-do assemble { target sparc64-*-* } } */ -/* { dg-options "" } */ - -register void *tp __asm__("%g7"); - -void set_tp(void) -{ - tp = 0; -} diff --git a/gcc/testsuite/gcc.dg/sparc-ret.c b/gcc/testsuite/gcc.dg/sparc-ret.c deleted file mode 100644 index 3a4ddea58ec..00000000000 --- a/gcc/testsuite/gcc.dg/sparc-ret.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 2001 Free Software Foundation. - - Making sure that Ultrasparc return instructions do not read - below the stack. */ - -/* { dg-do compile { target sparc-*-* } } */ -/* { dg-options "-mcpu=ultrasparc -O" } */ - - -int bar (int a, int b, int c, int d, int e, int f, int g, int h) -{ - int res; - - toto (&res); - return h; -} -/* { dg-final { global compiler_flags; if ![string match "*-m64 *" $compiler_flags] { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*ld\[ \t\]*\\\[%sp\\+96\\\]" } } } */ - -int bar2 () -{ - int res; - - toto (&res); - return res; -} -/* { dg-final { global compiler_flags; if ![string match "*-m64 *" $compiler_flags] { scan-assembler "return\[ \t\]*%i7\\+8\n\[^\n\]*nop" } } } */ diff --git a/gcc/testsuite/gcc.dg/sparc-trap-1.c b/gcc/testsuite/gcc.dg/sparc-trap-1.c deleted file mode 100644 index a516a886495..00000000000 --- a/gcc/testsuite/gcc.dg/sparc-trap-1.c +++ /dev/null @@ -1,20 +0,0 @@ -/* PR target/15693 */ -/* { dg-do compile { target sparc*-*-* } } */ -/* { dg-options "-O2" } */ - -/* This used to fail on SPARC at -O2 because the combiner - produces a compare insn that was not rematched by the - compare expander. */ - -static __inline__ __attribute__ ((always_inline)) -int page_mapping (unsigned flags) -{ - if (1u & (flags >> 16)) - return 1; - return 0; -} -void install_page (unsigned flags) -{ - if (__builtin_expect (!page_mapping (flags), 0)) - __builtin_trap (); -} diff --git a/gcc/testsuite/gcc.dg/splet-1.c b/gcc/testsuite/gcc.dg/splet-1.c deleted file mode 100644 index 03dbb2e3a3c..00000000000 --- a/gcc/testsuite/gcc.dg/splet-1.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Test inl-sparc.h. */ - -/* { dg-do run { target sparclet-*-* } } */ -/* { dg-options -mcpu=sparclet } */ - -#include <inl-sparc.h> - -main () -{ - int a,b; - - a = scan (1, 2); - if (a != 3) - abort (); - - b = shuffle (4, 5); - if (b != 6) - abort (); - - exit (0); -} diff --git a/gcc/testsuite/gcc.dg/ultrasp1.c b/gcc/testsuite/gcc.dg/ultrasp1.c deleted file mode 100644 index 82f586c7db8..00000000000 --- a/gcc/testsuite/gcc.dg/ultrasp1.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Simplified from testcase by David Staepelaere <staapa@ultimatech.com> */ - -/* { dg-do compile } */ -/* { dg-options "" } */ -/* { dg-options -mcpu=ultrasparc { target sparc-*-* } } */ - -int foo(long long y) { - return -1 * y; -} diff --git a/gcc/testsuite/gcc.dg/ultrasp10.c b/gcc/testsuite/gcc.dg/ultrasp10.c deleted file mode 100644 index 7cc5c93aaf7..00000000000 --- a/gcc/testsuite/gcc.dg/ultrasp10.c +++ /dev/null @@ -1,25 +0,0 @@ -/* PR target/11965 */ -/* Originator: <jk@tools.de> */ -/* { dg-do run { target { sparc*-*-* && ultrasparc_hw } } } */ -/* { dg-options "-O -mcpu=ultrasparc" } */ - -/* This used to fail on 32-bit Ultrasparc because GCC emitted - an invalid shift instruction. */ - - -static inline unsigned int shift(int n, unsigned int value) -{ - return value << n; -} - -unsigned int val = 1; - -int main(void) -{ - int i; - - for (i = 0; i < 4; i++) - val = shift(32, val); - - return 0; -} diff --git a/gcc/testsuite/gcc.dg/ultrasp11.c b/gcc/testsuite/gcc.dg/ultrasp11.c deleted file mode 100644 index 8f279f721ae..00000000000 --- a/gcc/testsuite/gcc.dg/ultrasp11.c +++ /dev/null @@ -1,25 +0,0 @@ -/* PR target/17245 */ -/* Origin: <aaronw@net.com> */ -/* Testcase by Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de> */ -/* { dg-do compile { target sparc*-*-* } } */ -/* { dg-options "-O -mcpu=v9" } */ - -/* This used to fail on 32-bit Ultrasparc because reload was emitting - a move insn that doesn't satisfy its constraints. */ - -int n; -double range ; -double bin ; -double wmean; - -double f () -{ - int i ; - long double W = 0 ; - for ( i = 0 ; i < n ; i ++) { - double xi = range; - double wi = bin; - W += wi ; - wmean += ( xi - wmean) * ( wi / W); - } -} diff --git a/gcc/testsuite/gcc.dg/ultrasp2.c b/gcc/testsuite/gcc.dg/ultrasp2.c deleted file mode 100644 index 1fd821c34e8..00000000000 --- a/gcc/testsuite/gcc.dg/ultrasp2.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (C) 1999 Free Software Foundation - by Alexandre Oliva <oliva@lsd.ic.unicamp.br> - Simplified from libg++/src/Fix16.cc */ - -/* { dg-do compile } */ -/* { dg-options "" } */ -/* { dg-options "-O0" { target sparc64-*-* sparcv9-*-* } } */ - -short foo() { - short i = (short)(1<<15); - return i; -} diff --git a/gcc/testsuite/gcc.dg/ultrasp3.c b/gcc/testsuite/gcc.dg/ultrasp3.c deleted file mode 100644 index 4458658a58e..00000000000 --- a/gcc/testsuite/gcc.dg/ultrasp3.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-options "" } */ -/* { dg-options "-mcpu=ultrasparc -mv8plus" { target sparc-*-* } } */ - -extern void abort (void); -extern void exit (int); - -unsigned long long foo (unsigned long long x) -{ - return 0x73500000735LL * x; -} - -unsigned long long a, b; -unsigned long p; - -unsigned long long bar (void) -{ - unsigned long long c = a | b; - return 0x73500000735LL * c; -} - -unsigned long long baz (void) -{ - unsigned long long c = (p + 345) & -2; - return c * a; -} - -main () -{ - if (foo (0x56789LL) != 0x26f32e5d26f32e5dLL) - abort (); - a = 0x8000000080000000LL; - b = 0x0000000180000001LL; - if (bar () != 0x120480000735LL) - abort (); - p = 0xffffffff; - if (baz () != 0xac00000000LL) - abort (); - exit (0); -} diff --git a/gcc/testsuite/gcc.dg/ultrasp4.c b/gcc/testsuite/gcc.dg/ultrasp4.c deleted file mode 100644 index 1c72d0659d4..00000000000 --- a/gcc/testsuite/gcc.dg/ultrasp4.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Simplified from PR target/5309. */ -/* { dg-do compile } */ -/* { dg-options "-O2" } */ -/* { dg-options "-O2 -mcpu=ultrasparc" { target sparc64-*-* sparcv9-*-* } } */ - -#if __INT_MAX__ > 32767 -#define PTR_TYPE long -#else -/* For 16-bit ports a long is a 32-bit quantity. So you cannot - cast a 32-bit long integer into a pointer which will only be - 16-bits long. */ -#define PTR_TYPE int -#endif - -extern PTR_TYPE bar (unsigned int); - -PTR_TYPE -foo (PTR_TYPE x, unsigned int y) -{ - return *(((PTR_TYPE *) (bar (y) - 1)) + 1 + (x >> 2) % 359); -} diff --git a/gcc/testsuite/gcc.dg/ultrasp5.c b/gcc/testsuite/gcc.dg/ultrasp5.c deleted file mode 100644 index 91f3d21ffb6..00000000000 --- a/gcc/testsuite/gcc.dg/ultrasp5.c +++ /dev/null @@ -1,12 +0,0 @@ -/* PR target/10072 */ -/* Originator: Peter van Hoof <p.van-hoof@qub.ac.uk> */ -/* { dg-do compile { target sparc-*-* } } */ -/* { dg-options "-std=c99 -O1 -mcpu=ultrasparc -ffast-math" } */ - -void p(int v) -{ - int i=v,j; - float a,b,c,x[i]; - - x[i] = (a/(((b)>(c)) ? (b) : (c)) - (((i) == (j)) ? 1.f : 0.f)); -} diff --git a/gcc/testsuite/gcc.dg/ultrasp6.c b/gcc/testsuite/gcc.dg/ultrasp6.c deleted file mode 100644 index 0518086402e..00000000000 --- a/gcc/testsuite/gcc.dg/ultrasp6.c +++ /dev/null @@ -1,150 +0,0 @@ -/* PR target/7784 */ -/* Originator: Peter van Hoof <p.van-hoof@qub.ac.uk> */ -/* { dg-do compile { target sparc-*-* } } */ -/* { dg-options "-O2 -mcpu=ultrasparc" } */ - -typedef struct -{ - float EnergyErg; - float ots; -} EmLine; - -extern const int ipH_LIKE ; -extern const int ipHYDROGEN ; -extern const int ipH1s; -extern const int ipH2s; -extern const int ipH2p; - -extern EmLine ****EmisLines; - -typedef struct -{ - long n; - long s; - long l; -} Elevels; - -extern struct t_iso -{ - float ***Pop2Ion; - long int numLevels[2][30L]; -} iso; - -extern struct t_LineSave -{ - long int nsum; - long int ndsum; - long int nComment; - long int npxdd; - long int ipass; - char chHoldComments[10][200]; -} LineSave; - -extern struct t_hydro -{ - int lgHydEmiss; - float **pestrk ; -} hydro; - -extern struct t_dense -{ - double DensityLaw[10]; - float frad[500]; - float fhden[500]; - float den0; - double eden; -} dense; - -extern struct t_abund -{ - float xIonFracs[30L +3][30L +1]; -} abund; - -extern struct t_CaseBHS -{ - long int nDensity[2][8] , ntemp[2][8] , ncut[2][8] ; - int lgHCaseBOK[2][8]; -} CaseBHS ; - -extern struct t_smbeta -{ - float SimHBeta, - cn4861, - cn1216, - sv4861, - sv1216; -} smbeta; - -extern struct t_phycon -{ - float te; -} phycon; - - -extern struct t_sphere -{ - int lgSphere; - float covgeo; -} sphere; - -void linadd(double xInten, float wavelength, char *chLab, char chInfo); - -extern struct t_radiusVar -{ - int lgDrNeg; - double dVeff; -} radius; - -void lines_hydro(void) -{ - long int i, nelem, ipHi, ipLo; - double hbetab, em , EmisFac, pump; - char chLabel[5]; - - linadd(abund.xIonFracs[ipHYDROGEN][1]*iso.Pop2Ion[ipH_LIKE][ipHYDROGEN][3]*hydro.pestrk[3][2]*3.025e-12, 6563,"Strk",'i'); - - linadd(abund.xIonFracs[ipHYDROGEN][1]*iso.Pop2Ion[ipH_LIKE][ipHYDROGEN][4]*hydro.pestrk[4][2]*4.084e-12, 4861,"Strk",'i'); - - linadd(abund.xIonFracs[ipHYDROGEN][1]*iso.Pop2Ion[ipH_LIKE][ipHYDROGEN][4]*hydro.pestrk[4][3]*1.059e-12, 18751,"Strk",'i'); - - linadd(abund.xIonFracs[ipHYDROGEN][1]*iso.Pop2Ion[ipH_LIKE][ipHYDROGEN][5]*hydro.pestrk[5][4]*4.900e-13, 40512,"Strk",'i'); - - ((void)((LineSave.ipass <1 || EmisLines[ipH_LIKE][ipHYDROGEN][ipH2p][ipH1s].ots>= 0.) || (__assert("LineSave.ipass <1 || EmisLines[ipH_LIKE][ipHYDROGEN][ipH2p][ipH1s].ots>= 0.", "lines_hydro.c", 118), 0))); - - linadd(EmisLines[ipH_LIKE][ipHYDROGEN][3][ipH2s].ots*EmisLines[ipH_LIKE][ipHYDROGEN][3][ipH2s].EnergyErg, 6563,"Dest",'i'); - - linadd(EmisLines[ipH_LIKE][ipHYDROGEN][5][4].ots*EmisLines[ipH_LIKE][ipHYDROGEN][5][4].EnergyErg,40516, "Dest",'i'); - - smbeta.SimHBeta = smbeta.SimHBeta/(float)radius.dVeff*sphere.covgeo; - - linadd(smbeta.SimHBeta,4861,"Q(H)",'i'); - - smbeta.SimHBeta = smbeta.SimHBeta*(float)radius.dVeff/sphere.covgeo; - - for( nelem=0; nelem < 30L; nelem++ ) - { - int iCase; - for( iCase=0; iCase<2; ++iCase ) - { - char chAB[2]={'A','B'}; - char chLab[5]="Ca "; - - for( ipLo=1+iCase; ipLo<(((6)<(iso.numLevels[ipH_LIKE][nelem])) ? (6) : (5)); ++ipLo ) - { - for( ipHi=ipLo+1; ipHi< (((ipLo+5)<(iso.numLevels[ipH_LIKE][nelem])) ? (ipLo+5) : (iso.numLevels[ipH_LIKE][nelem])); ++ipHi ) - { - float wl; - - hbetab = HSRate( ipHi,ipLo , nelem+1, phycon.te , dense.eden, chAB[iCase] ); - if( hbetab<=0. ) - CaseBHS.lgHCaseBOK[iCase][nelem] = 0; - - if( !hydro.lgHydEmiss ) - hbetab *= abund.xIonFracs[nelem][nelem+1]*dense.eden; - - linadd(hbetab,wl,chLab,'i' ); - } - } - } - } -} diff --git a/gcc/testsuite/gcc.dg/ultrasp7.c b/gcc/testsuite/gcc.dg/ultrasp7.c deleted file mode 100644 index 541295da88b..00000000000 --- a/gcc/testsuite/gcc.dg/ultrasp7.c +++ /dev/null @@ -1,50 +0,0 @@ -/* PR c/8281 */ -/* Originator: TANIGUCHI Yasuaki <yasuaki@k8.dion.ne.jp> */ -/* { dg-do compile { target sparc-*-* } } */ -/* { dg-require-effective-target fpic } */ -/* { dg-options "-O2 -mcpu=ultrasparc -fPIC" } */ - -static const double bp = 1.0, dp_l[] = { 0.0 }; - -double __ieee754_pow(double x, double y) -{ - union { - int lo; - double d; - }uz; - - double y1,t1,p_h,t,z; - double z_h,z_l,p_l; - double t2,r,s,u,v,w; - int i = 0; - - double s_h,t_h; - double s2,s_l,t_l; - - - v = 1.0/(v+bp); - uz.d = s_h = s = u*v; - uz.lo = 0; - s_h = uz.d; - uz.d = t_h; - uz.lo = 3; - t_h = uz.d; - s_l = v*((u-s_h*t_h)-s_h*t_l); - s2 = s*s; - r = s2* s2* (1.1+s2*(1.2+s2*(1.3+s2*(1.4+s2*(1.5+s2*1.6))))); - s2 = s_h*s_h; - uz.lo = 0; - t_h = uz.d; - t_l = r-((t_h-3.0)-s2); - v = s_l*t_h+t_l*s; - p_l = v-(p_h-u); - z_h = bp *p_h; - z_l = bp*p_h+p_l*1.0+dp_l[i]; - t = (double)i; - t1 = (((bp+z_l)+bp)+t); - t2 = z_l-(((t1-t)-bp)-z_h); - p_l = (y-y1)*t1+y*t2; - z = p_l+p_h; - - return s*z; -} diff --git a/gcc/testsuite/gcc.dg/ultrasp8.c b/gcc/testsuite/gcc.dg/ultrasp8.c deleted file mode 100644 index f9289fae0ea..00000000000 --- a/gcc/testsuite/gcc.dg/ultrasp8.c +++ /dev/null @@ -1,39 +0,0 @@ -/* PR target/10067 */ -/* Originator: <dat94ali@ludat.lth.se> */ -/* { dg-do compile { target sparc*-*-* } } */ -/* { dg-options "-O2 -mtune=supersparc" { target sparc64-*-* sparcv9-*-* } } */ - -struct _reent; - -extern unsigned long __malloc_trim_threshold; -extern unsigned long __malloc_top_pad; - -int _mallopt_r(struct _reent *reent_ptr, int param_number, int value) -{ - __malloc_lock(reent_ptr); - - switch(param_number) - { - case -1: - __malloc_trim_threshold = value; - __malloc_unlock(reent_ptr); - return 1; - - case -2: - __malloc_top_pad = value; - __malloc_unlock(reent_ptr); - return 1; - - case -3: - __malloc_unlock(reent_ptr); - return 1; - - case -4: - __malloc_unlock(reent_ptr); - return value == 0; - - default: - __malloc_unlock(reent_ptr); - return 0; - } -} diff --git a/gcc/testsuite/gcc.dg/ultrasp9.c b/gcc/testsuite/gcc.dg/ultrasp9.c deleted file mode 100644 index 0af2c7e8601..00000000000 --- a/gcc/testsuite/gcc.dg/ultrasp9.c +++ /dev/null @@ -1,39 +0,0 @@ -/* PR optimization/11018 */ -/* Originator: <partain@dcs.gla.ac.uk> */ -/* { dg-do run { target { sparc*-*-* && ultrasparc_hw } } } */ -/* { dg-options "-O2 -mcpu=ultrasparc" } */ - -/* This used to fail on 32-bit Ultrasparc because - of broken DImode shift patterns. */ - -extern void abort(void); - -typedef unsigned long long uint64_t; -typedef unsigned int size_t; - - -void to_octal (uint64_t value, char *where, size_t size) -{ - uint64_t v = value; - size_t i = size; - - do - { - where[--i] = '0' + (v & ((1 << 3) - 1)); - v >>= 3; - } - while (i); -} - - -int main (void) -{ - char buf[8]; - - to_octal(010644, buf, 6); - - if (buf[1] != '1') - abort(); - - return 0; -} |