aarch64: Fix reg_is_wrapped_separately array size [PR100211]
[official-gcc.git] / gcc / testsuite / gcc.dg / vla-init-1.c
blob3125b703451223128f27d0b4f39ad832d546b7a2
1 /* Test for tree-checking error when initializing a variable-length array
2 (not allowed): constructor_max_index needs to be an INTEGER_CST. */
3 /* Origin: Joseph Myers <jsm28@cam.ac.uk>. */
4 /* { dg-do compile } */
5 /* { dg-options "" } */
7 int a;
9 void
10 foo (void)
12 int x[a] = { 1 }; /* { dg-error "variable-sized object may not be initialized" "VLA init" } */