1 /* { dg-do compile } */
2 /* { dg-require-effective-target alloca } */
3 /* { dg-options "-Wvla-larger-than=100 -O2" } */
5 typedef __SIZE_TYPE__
size_t;
7 extern void useit (char *);
11 void test_vlas (size_t num
)
13 char str2
[num
]; /* { dg-warning "unbounded use" } */
17 for (int i
=0; i
< 1234; ++i
) {
18 char str
[num
]; // OK, VLA in a loop, but it is a
19 // known size *AND* the compiler takes
20 // care of cleaning up between
22 // __builtin_stack_restore.