Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/20040805-1.c

raw
1 /* { dg-require-stack-size "0x12000" } */
2
3 void abort (void);
4 void exit (int);
5
6 #if __INT_MAX__ < 32768
7 int main () { exit (0); }
8 #else
9 int a[2] = { 2, 3 };
10
11 static int __attribute__((noinline))
12 bar (int x, void *b)
13 {
14 a[0]++;
15 return x;
16 }
17
18 static int __attribute__((noinline))
19 foo (int x)
20 {
21 char buf[0x10000];
22 int y = a[0];
23 a[1] = y;
24 x = bar (x, buf);
25 y = bar (y, buf);
26 return x + y;
27 }
28
29 int
30 main ()
31 {
32 if (foo (100) != 102)
33 abort ();
34 exit (0);
35 }
36 #endif