1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
// VLA sizeof test // { dg-do compile } // { dg-options "" } int f1 (int i) { char a[sizeof (i) + 6 + i]; char b[sizeof (a) + 1]; return sizeof (b); } int f2 (int i) { char a[sizeof (i) + 6 + i]; char b[sizeof (a)]; return sizeof (b); } int f3 (int i) { char a[sizeof (i) + 6 + i]; char b[sizeof (i) + i]; char c[sizeof (a) + sizeof (b) + 7]; return sizeof (c); }