struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug2761883.c
blobc3a4b742dcde6881c32b3426cea5289b9bb8a0fe
1 /*
2 bug2761883.c
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC_STACK_AUTO
8 #define __xdata
9 #endif
11 volatile char __xdata xx1;
12 volatile int __xdata xx2;
14 extern void func1 (char __xdata p1, int __xdata p2);
16 void
17 testBug (void)
19 func1 (14, 16); // this would pass p2 in data memory
20 ASSERT (xx1 == 14);
21 ASSERT (xx2 == 16);
24 void
25 func1 (char __xdata p1, int __xdata p2)
27 xx1 = p1;
28 xx2 = p2; // while this tried to get it from xdata