struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3239.c
blob9c35151c0e3ca667ac714150e567ca07d29afcc2
1 /*
2 bug-3239.c. A jump was incorrectly redirected to a non-exisitng label in the peephole optimizer when the name of the callee was a prefix of the caller's name.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 #ifndef __SDCC_stm8
12 #define __cosmic
13 #endif
15 unsigned char f(unsigned char i) __cosmic;
17 unsigned char f_wrap_cosmic(unsigned char i) __cosmic
19 return f(i);
22 void
23 testBug (void)
25 ASSERT (f_wrap_cosmic (23) == 42);
28 unsigned char f(unsigned char i) __cosmic
30 return i == 23 ? 42 : 3;