Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / bug3410620.c.in
blobb096ff69d61b3b6dfda32fbdb0576ec5775ddbaa
1 /*
2 bug3410620.c
3 bank: 1, 2
4 */
6 #include <testfwk.h>
8 #define INTREGBANK {bank}
10 #if defined(__SDCC_mcs51) || defined (__SDCC_ds390)
12 void handler1(void) __using(INTREGBANK)
16 typedef void (*phandler_t)(void) __using(INTREGBANK);
17 phandler_t phandlers[8] = {handler1};
19 volatile unsigned char GetInterruptSource; //some dummy for real hardware
21 /* No need to call this, threw
22 warning 139: call via function pointer in ISR using non-zero register bank.
23 Cannot determine which register bank to save.*/
24 void Int0_isr(void) __interrupt(0) __using(1)
26 unsigned char intsrc;
27 intsrc = GetInterruptSource;
28 phandlers[intsrc](); // warning 139 refers to this line
31 #endif
33 void testBug(void)
35 ASSERT (1);