1 /* { dg-do compile } */
2 /* { dg-require-effective-target alloca } */
3 /* { dg-options "-Walloca-larger-than=2000 -O2" } */
11 if (n
> 0 && n
< 2000)
12 p
= __builtin_alloca (n
); // { dg-bogus "unbounded use of 'alloca'" "" }
14 p
= __builtin_malloc (n
);
23 p
= __builtin_alloca (n
); // { dg-warning "may be too large" }
25 p
= __builtin_malloc (n
);
33 if (n
> 0 && n
< 3000)
35 p
= __builtin_alloca (n
); // { dg-warning "may be too large" }
38 p
= __builtin_malloc (n
);