1 /* Verify that VLA definitions with an unknown upper bound don't trigger
2 -Wvla-larger-than= warnings by default.
4 { dg-require-effective-target alloca }
5 { dg-options "-O2 -Wall" } */
9 void nowarn_vla_int (int n
)
20 void nowarn_vla_uint (unsigned n
)
32 void nowarn_vla_long (long n
)
43 void nowarn_vla_ulong (unsigned long n
)
55 /* Verify that a VLA whose size is definitely in excess of PTRDIFF_MAX
56 is diagnosed by default. */
58 void warn_vla (__PTRDIFF_TYPE__ n
)
63 if (n
<= __PTRDIFF_MAX__
)
66 int b
[n
]; /* { dg-warning "argument to variable-length array is too large" } */