3 /* Bug #3260 caused typecast function pointers to pass all */
4 /* parameters via the stack and not pass any parameter via */
5 /* register, even when some should have been passed via */
8 /* Look for __SDCC_STACK_AUTO to make sure the port is */
9 /* parameters in registers and/or stack and not statically */
10 #if defined(__SDCC_STACK_AUTO) || defined(PORT_HOST)
11 int (*p
)(int, int) __reentrant
;
13 void (*q
)(void) __reentrant
;
22 return (*(((int (*)(int, int))q
)))(23, 42);
25 int c(int a
, int b
) __reentrant
34 #if defined(__SDCC_STACK_AUTO) || defined(PORT_HOST)
36 q
= (void (*)(void))(&c
);
37 ASSERT (f() == 23 - 42);
38 ASSERT (g() == 23 - 42);