Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / Walloca-larger-than-4.c
blob9d4c4e8d062a4ef9a6c7f1a0a5eb6838093b63e9
1 /* PR middle-end/100425 - missing -Walloca-larger-than with -O0
2 { dg-do compile }
3 { dg-options "-O0 -Wall -Walloca-larger-than=128" } */
5 typedef __SIZE_TYPE__ size_t;
7 void* alloca (size_t);
9 void sink (void*);
11 void warn_alloca_too_large (void)
13 sink (alloca (1));
14 sink (alloca (128));
15 sink (alloca (129)); // { dg-warning "\\\[-Walloca-larger-than" }
16 sink (alloca (128 + 2)); // { dg-warning "\\\[-Walloca-larger-than" }
17 sink (alloca (1024)); // { dg-warning "\\\[-Walloca-larger-than" }