libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / Walloca-larger-than-4.c
blobaac8b9732f7540b73b9bad0f445863bdc83323d0
1 /* PR middle-end/100425 - missing -Walloca-larger-than with -O0
2 { dg-do compile }
3 { dg-options "-O0 -Wall -Walloca-larger-than=128" }
4 { dg-require-effective-target alloca } */
6 typedef __SIZE_TYPE__ size_t;
8 void* alloca (size_t);
10 void sink (void*);
12 void warn_alloca_too_large (void)
14 sink (alloca (1));
15 sink (alloca (128));
16 sink (alloca (129)); // { dg-warning "\\\[-Walloca-larger-than" }
17 sink (alloca (128 + 2)); // { dg-warning "\\\[-Walloca-larger-than" }
18 sink (alloca (1024)); // { dg-warning "\\\[-Walloca-larger-than" }