PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / pr70017.c
blob3489d5baf48960ef4d7a02881d638c3f9657f514
1 /* { dg-do compile } */
2 /* { dg-require-stack-check "generic" } */
3 /* { dg-options "-fstack-check=generic" } */
5 /* Check that the expected warning is issued for large frames. */
7 #define ONE(s) char a##s[32];
8 #define TEN(s) ONE(s##0) ONE(s##1) ONE(s##2) ONE(s##3) ONE(s##4) \
9 ONE(s##5) ONE(s##6) ONE(s##7) ONE(s##8) ONE(s##9)
10 #define HUNDRED(s) TEN(s##0) TEN(s##1) TEN(s##2) TEN(s##3) TEN(s##4) \
11 TEN(s##5) TEN(s##6) TEN(s##7) TEN(s##8) TEN(s##9)
13 void foo(void)
15 HUNDRED(a)
16 HUNDRED(b)
17 #undef ONE
18 #define ONE(s) a##s[0] = 0;
19 HUNDRED(a)
20 HUNDRED(b)
21 } /* { dg-warning "frame size too large for reliable stack checking" "" { target { ! alpha*-*-* } } } */