1 /* PR18191 Struct member is not getting default-initialized.
2 Origin: Grigory Zagorodnev <grigory.zagorodnev@intel.com> */
6 extern int printf (__const
char *__restrict __format
, ...);
19 /* Put some garbage on the stack. */
20 for (i
= 0; i
< sizeof(dummy
); i
++)
21 ((char *)&dummy
)[i
] = -1;
27 /* Allocate object on the stack. */
28 S obj
[2] = { {"m0"}, {"m1"} };
30 /* Assume fields those not explicitly initialized
31 are default initialized to 0 [8.5.1/7 and 8.5/5]. */
36 printf("Failed: obj[0].i == '%d', expecting '0'\n", obj
[0].i
);