1 /* { dg-do compile } */
2 /* { dg-require-effective-target alloca } */
3 /* { dg-options "-Walloca -O0" } */
4 
5 extern void f(void *);
6 
foo(void)7 void foo(void)
8 {
9   // Test that strict -Walloca works even without optimization.
10   f (__builtin_alloca(500)); // { dg-warning "use of 'alloca'" }
11 }
12 
bar(void)13 void bar(void)
14 {
15   // Test that we warn on alloca() calls, not just __builtin_alloca calls.
16   extern void *alloca(__SIZE_TYPE__);
17   f (alloca (123)); // { dg-warning "use of 'alloca'" }
18 }
19