struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-bf-pack-1.c
blobb2cf526a76212c959b18a676fb052d361d88d741
1 /*
2 bf-pack-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #if 0 // Enable when SDCC supports bit-fields wider than 16 bits
8 struct foo
10 unsigned half:16;
11 unsigned long whole:32;
14 f (struct foo *q)
16 if (q->half != 0x1234)
17 ASSERT (0);
18 if (q->whole != 0x56789abcL)
19 ASSERT (0);
21 #endif
23 void
24 testTortureExecute (void)
26 #if 0
27 struct foo bar;
29 bar.half = 0x1234;
30 bar.whole = 0x56789abcL;
31 f (&bar);
32 return;
33 #endif