1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/* { dg-do compile } */ /* { dg-require-effective-target alloca } */ void foo(int n) { struct X { int a[n]; } y; struct X baz (struct X x) { x.a[0] = 1; return x; } y.a[0] = 0; y = baz(y); if (y.a[0] != 1) __builtin_abort (); }