Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / bug-2419.c
blob177c459ad9ad3b5e36666ca12f5f1cc67dea732b
1 /*
2 bug-2419.c
3 */
5 #include <testfwk.h>
7 #if defined (__SDCC_mcs51) || defined (__SDCC_hc08) || defined (__SDCC_s08) || defined (__SDCC_ds390) || defined (__SDCC_ds400)
8 #define XDATA __xdata
9 #else
10 #define XDATA
11 #endif
13 char XDATA c0[] = "123";
14 char XDATA c1[] = "abc";
15 char XDATA *gp = c0;
17 void XDATA *aligned_a (void)
19 return gp;
22 extern void XDATA *aligned_a (void);
24 void testBug (void)
26 ASSERT (aligned_a () == c0);
27 gp = c1;
28 ASSERT (aligned_a () == c1);