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