1 /* { dg-do compile } */
2 /* { dg-options "-std=gnu99" } */
3 /* { dg-require-effective-target alloca } */
4
5 /* These are crash tests related to PR middle-end/6994; see also
6 g++.dg/ext/vla1.C. Note that at present A and C cannot be inlined. */
7
8 static inline void A (int i)
9 {
10 struct S { int ar[1][i]; } s;
11
12 s.ar[0][0] = 0;
13 }
14
15 void B(void)
16 {
17 A(23);
18 }
19
20 static inline void C (int i)
21 {
22 union U { int ar[1][i]; } u;
23
24 u.ar[0][0] = 0;
25 }
26
27 void D(void)
28 {
29 C(23);
30 }