libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / Wvla-parameter-9.c
blob6c8987a34eb0d0323931ea9956e5e5858d986ef7
1 /* PR c/100550 - ICE: in fold_convert_loc with function call VLA argument
2 { dg-do compile }
3 { dg-options "-Wall" } */
5 struct S { int i; };
7 extern void v;
8 extern void *pv;
9 extern struct S s;
10 void vf (void);
12 /* Verify that a function redeclaration with an invalid VLA doesn't ICE. */
14 void f0 (int[]);
15 void f0 (int[undeclared]); // { dg-error "undeclared" }
17 void f1 (int[]);
18 void f1 (int[-1]); // { dg-error "size" }
20 void f2 (int[]);
21 void f2 (int[v]); // { dg-error "size" }
23 void f3 (int[]);
24 void f3 (int b[s]); // { dg-error "size" }
26 void f4 (int[]);
27 void f4 (int c[pv]); // { dg-error "size" }
29 void f5 (int[]);
30 void f5 (int d[vf ()]); // { dg-error "size" }