struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2306.c
blob84a67242668f906e511e79df8668c3fd727f0791
1 /*
2 bug-2306.c frame pointer omission triggered a code generation bug in 16-bit addition short functions.
3 */
5 #include <testfwk.h>
7 int add(int pa, int pb)
9 return pa * 2 + pb;
12 void testBug(void)
14 ASSERT (add(0x0023, 0x0042) == 0x0023 * 2 + 0x0042);
15 ASSERT (add(0x2300, 0x4200) == 0x2300 * 2 + 0x4200);