Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.c-torture / execute / nestfunc-2.c
blob030875560dc51b0b6e47ff01afaf166aaf445c70
1 extern int foo (int, int, int (*) (int, int, int, int, int, int, int));
3 int z;
5 int
6 main (void)
8 #ifndef NO_TRAMPOLINES
9 int sum = 0;
10 int i;
12 int nested (int a, int b, int c, int d, int e, int f, int g)
14 z = c + d + e + f + g;
16 if (a > 2 * b)
17 return a - b;
18 else
19 return b - a;
22 for (i = 0; i < 10; ++i)
24 int j;
26 for (j = 0; j < 10; ++j)
28 int k;
30 for (k = 0; k < 10; ++k)
31 sum += foo (i, j > k ? j - k : k - j, nested);
35 if (sum != 2300)
36 abort ();
38 if (z != 0x1b)
39 abort ();
40 #endif
42 exit (0);
45 int
46 foo (int a, int b, int (* fp) (int, int, int, int, int, int, int))
48 return fp (a, b, a, b, a, b, a);