struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3216.c
blobb9d685f54966cfffc289707b77a04f2aa738c811
1 /*
2 bug-3216.c
3 A bug in r3ka code generation for 32-bit additions in handling iy
4 */
6 #include <testfwk.h>
8 unsigned long c90base(void);
9 unsigned long c90lib(void);
11 unsigned long c90base_score, c90lib_score;
13 unsigned long stdcbench(void)
15 unsigned long score = 0;
17 score += c90base_score = c90base();
19 score += c90lib_score = c90lib();
21 return(score);
24 unsigned long c90base(void)
26 return 0x01020304ul;
29 unsigned long c90lib(void)
31 return 0x10203040ul;
34 void
35 testBug (void)
37 ASSERT(stdcbench() == 0x11223344ul);
38 ASSERT(c90base_score == 0x01020304ul);
39 ASSERT(c90lib_score == 0x10203040ul);