1 /* PR c/64918 */ 2 /* { dg-do compile } */ 3 /* { dg-options "-Wno-override-init-side-effects" } */ 4 5 struct S { int m, n; }; 6 union U { short s; long int l; }; 7 8 void foo(int i)9foo (int i) 10 { 11 int a[] = { 12 [0] = ++i, 13 [1] = i, 14 [0] = 42 15 }; 16 struct S s = { 17 .n = ++i, 18 .m = i, 19 .n = i 20 }; 21 union U u = { 22 .s = i--, 23 .l = 42 24 }; 25 } 26