struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20031211-2.c
blobb78a48990c42749fd981ecc2ea9d55753258fc6c
1 /*
2 20031211-2.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 a
13 unsigned int bitfield : 3;
16 void foo(unsigned int z);
18 void
19 testTortureExecute (void)
21 struct a a;
23 a.bitfield = 131;
24 foo (a.bitfield);
25 return;
28 void foo(unsigned int z)
30 if (z != 3)
31 ASSERT (0);