struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-struct-ini-1.c
blobcdd76e2476c37e1076530fd31cedc3db42f8c65c
1 /*
2 struct-ini-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 #if 0 // TODO: Enable when SDCC allows brace omission in struct initialization!
12 struct S
14 char f1;
15 int f2[2];
18 struct S object = {'X', 8, 9};
19 #endif
21 void
22 testTortureExecute (void)
24 #if 0 // TODO: Enable when SDCC allows brace omission in struct initialization!
25 if (object.f1 != 'X' || object.f2[0] != 8 || object.f2[1] != 9)
26 ASSERT (0);
27 return;
28 #endif