struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug1712928.c
blob08cf3ccd97024ebc888ab3e367a82ff498908a00
1 /*
2 bug1712928.c
3 */
5 #include <testfwk.h>
7 #if defined (__SDCC_mcs51)
8 unsigned char NakedFunc(void) __naked
10 __asm
11 mov dpl,#0x01
12 #if defined (__SDCC_MODEL_HUGE)
13 ljmp __sdcc_banked_ret
14 #else
15 ret
16 #endif
17 __endasm;
19 #endif
21 void
22 testBug(void)
24 #if defined (__SDCC_mcs51)
25 unsigned char hsum, sum;
27 hsum = NakedFunc();
28 sum = NakedFunc();
29 sum += hsum;
31 ASSERT(sum == 2);
32 #endif