* gcc.dg/const-elim-1.c: xfail for xtensa.
[official-gcc.git] / gcc / testsuite / gcc.dg / 20001102-1.c
blob2d9e45b0de377c75e69681cf1c58aeec430f15eb
1 /* ??? It'd be nice to run this for sparc32 as well, if we could know
2 for sure that we're on an ultrasparc, rather than an older cpu. */
3 /* { dg-do run { target sparcv9-*-* sparc64-*-* } } */
4 /* { dg-options "-O2 -m32 -mcpu=ultrasparc -mvis" } */
6 int foo(double a, int b, int c, double *d, int h)
8 int f, g;
9 double e;
12 f = (int) a;
13 a -= (double) f;
14 if (b == 1)
16 g = c;
17 f += g;
18 c -= g;
20 if (b == 2)
22 f++;
23 h = c;
24 goto l;
27 asm volatile ("" : : :
28 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
29 "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
30 "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
31 "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31");
33 return f & 7;
36 int main()
38 if (foo(0.1, 1, 3, 0, 1) != 3)
39 abort ();
40 exit (0);