struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-bf-sign-1.c
blobcb2db66b15be674534c196ed54ff85258b4abd17
1 /*
2 bf-sign-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 void
8 testTortureExecute (void)
10 struct {
11 signed int s:3;
12 unsigned int u:3;
13 int i:3;
14 } x = {-1, -1, -1};
16 if (x.u != 7)
17 ASSERT (0);
18 if (x.s != - 1)
19 ASSERT (0);
21 if (x.i != -1 && x.i != 7)
22 ASSERT (0);
24 return;