2016-12-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr70017.c
blobf544167612b9c396717b89ee92cc6e934ea1576c
1 /* { dg-do compile } */
2 /* { dg-options "-fstack-check=generic" } */
4 /* Check that the expected warning is issued for large frames. */
6 #define ONE(s) char a##s[32];
7 #define TEN(s) ONE(s##0) ONE(s##1) ONE(s##2) ONE(s##3) ONE(s##4) \
8 ONE(s##5) ONE(s##6) ONE(s##7) ONE(s##8) ONE(s##9)
9 #define HUNDRED(s) TEN(s##0) TEN(s##1) TEN(s##2) TEN(s##3) TEN(s##4) \
10 TEN(s##5) TEN(s##6) TEN(s##7) TEN(s##8) TEN(s##9)
12 void foo(void)
14 HUNDRED(a)
15 HUNDRED(b)
16 #undef ONE
17 #define ONE(s) a##s[0] = 0;
18 HUNDRED(a)
19 HUNDRED(b)
20 } /* { dg-warning "frame size too large for reliable stack checking" "" { target { ! alpha*-*-* } } } */