1 /* { dg-do compile } */
2 /* { dg-require-effective-target alloca } */
3 /* { dg-options "-Walloca-larger-than=2000 -O2" } */
5 // Test when the conditionals are incorrectly reversed.
8 void foo (__SIZE_TYPE__ len
)
12 p
= __builtin_malloc (len
);
14 p
= __builtin_alloca (len
); // { dg-warning "argument to .alloca. may be too large" }
18 void bar (__SIZE_TYPE__ len
)
22 p
= __builtin_alloca (len
); // { dg-warning "argument to .alloca. may be too large" }
24 p
= __builtin_malloc (len
);