OSDN Git Service

* gcc.dg/vect/vect-116.c: Add vect_int target requirement.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20001101-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     }
26   if (!h)
27     {
28       for (g = 0; g <= 10; g++)
29         for (h = 0; h <= 10; h++)
30           e += d [10 + g - h];
31       goto l;
32     }
33   return f & 7;
34 }
35
36 int main()
37 {
38   if (foo(0.1, 1, 3, 0, 1) != 3)
39     abort ();
40   exit (0);
41 }