struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug1509084.c
blob299e8ad866edca6684e3aeddb0eff986d3cb5c0d
1 /*
2 bug 1509084
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_sdcc99
9 #endif
11 #include <stdbool.h>
13 #if !defined(__bool_true_false_are_defined)
14 #define bool unsigned char
15 #endif
17 unsigned char aa, bb, cc, dd, ee;
19 void leds_name_repaint(void)
21 unsigned char an;
22 unsigned char dg = aa;
23 bool s = 0;
25 for( an = 0; an < 5; an ++ )
27 s = ( (long) aa >> 1 ) > 0;
28 if( s )
30 aa += dg + 1;
31 bb += dg + 2;
32 cc += dg + 3;
33 dd += dg + 4;
34 ee += dg + 5;
39 void
40 testBug(void)
42 aa = 2;
43 leds_name_repaint();
44 ASSERT(aa == 17);