1 /* { dg-do compile } */
2 /* { dg-options "-std=c23 -Woverride-init" } */
12 #embed __FILE__ suffix (,)
13 [sizeof (a
) / 4] = 0, /* { dg-warning "initialized field overwritten" } */
14 [sizeof (a
) / 2] = 1, /* { dg-warning "initialized field overwritten" } */
15 [1] = 2, /* { dg-warning "initialized field overwritten" } */
16 [sizeof (a
) - 2] = 3 /* { dg-warning "initialized field overwritten" } */
24 #embed __FILE__ prefix ([0] = ) /* { dg-warning "initialized field overwritten" } */
27 #embed __FILE__ suffix (,)
28 [2] = 9, /* { dg-warning "initialized field overwritten" } */
29 [sizeof (a
) - 3] = 10 /* { dg-warning "initialized field overwritten" } */
33 [sizeof (a
) / 4 - 1] = 12,
34 #embed __FILE__ limit (128) prefix ([sizeof (a) / 4 - 1] = ) suffix (,) /* { dg-warning "initialized field overwritten" } */
35 #embed __FILE__ limit (130) prefix ([sizeof (a) / 4 - 2] = ) suffix (,) /* { dg-warning "initialized field overwritten" } */
36 #embed __FILE__ prefix ([sizeof (a) / 4 + 10] = ) suffix (,) /* { dg-warning "initialized field overwritten" } */
37 #embed __FILE__ limit (128) prefix ([sizeof (a) + sizeof (a) / 4 - 30] = ) suffix (,) /* { dg-warning "initialized field overwritten" } */
38 #embed __FILE__ limit (128) prefix ([sizeof (a) / 4 + 96] = ) suffix (,) /* { dg-warning "initialized field overwritten" } */
40 const unsigned char g
[] = {
41 #embed __FILE__ limit (128) prefix ( [10] = 2, [5] = 3, [13] = 4, [17] = 5, [0] = ) /* { dg-warning "initialized field overwritten" } */