OSDN Git Service

Index: gcc/ChangeLog
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20001102-1.c
1 /* { dg-do run { target sparc*-*-* } } */
2 /* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
3
4 extern void abort (void);
5 extern void exit (int);
6
7 int foo(double a, int b, int c, double *d, int h)
8 {
9   int f, g;
10   double e;
11
12 l:
13   f = (int) a;
14   a -= (double) f;
15   if (b == 1)
16     {
17       g = c;
18       f += g;
19       c -= g;
20     }
21   if (b == 2)
22     {
23       f++;
24       h = c;
25       goto l;
26     }
27
28   asm volatile ("" : : :
29                 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
30                 "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
31                 "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
32                 "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31");
33
34   return f & 7;
35 }
36
37 int main()
38 {
39   if (foo(0.1, 1, 3, 0, 1) != 3)
40     abort ();
41   exit (0);
42 }