Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / bug1198642.c
blobf2ae61608c82aa8fd83cf067cb14a955109dfbdc
1 /*
2 bug1198642.c
3 */
5 #include <testfwk.h>
7 void
8 test_cse_generic_ptr (void)
10 #if defined(__SDCC_mcs51)
11 volatile void *p1;
12 volatile void *p2;
14 p1 = (__data char *)1;
15 p2 = (__idata char *)1;
16 ASSERT (p1 == p2);
18 p1 = (__data char *)1;
19 p2 = (__xdata char *)1;
20 ASSERT (p1 != p2);
22 p1 = (__data char *)1;
23 p2 = (__idata char *)2;
24 ASSERT (p1 != p2);
25 #endif