struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-struct-ini-3.c
blob84344475d72b9e15110140c5c19f95542d4e75c2
1 /*
2 struct-ini-3.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 struct
13 unsigned int f1:1, f2:1, f3:3, f4:3, f5:2, f6:1, f7:1;
14 } result = {1, 1, 7, 7, 3, 1, 1};
16 void
17 testTortureExecute (void)
19 if ((result.f3 & ~7) != 0 || (result.f4 & ~7) != 0)
20 ASSERT (0);
21 return;