struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug1678803.c
blobc866b024e43db0a7621f0680c2921f808fcad8a3
1 /*
2 bug 1678803
3 This should not generate error 12 "called object is not a function".
4 */
6 #include <testfwk.h>
8 typedef void (*func)(void);
10 void foo(void)
14 #ifdef __SDCC_mcs51
15 func GetFunc(void) __naked
17 __asm
19 ; some assembler code
20 mov dptr,#_foo
21 #ifdef __SDCC_MODEL_HUGE
22 mov B,#_foo>>16
23 ljmp __sdcc_banked_ret
24 #else
25 ret
26 #endif
27 __endasm;
29 #endif
31 void testCaller(void)
33 #ifdef __SDCC_mcs51
34 GetFunc()();
35 #endif
37 ASSERT (1);