struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug1921073.c
blobaa37585498bc6d42cad530b929c868e47eb6864f
1 /*
2 bug 1921073
3 */
5 #include <testfwk.h>
7 void
8 f1 (char c, const void * p)
10 unsigned long v = (unsigned long)p;
13 #if defined(__SDCC_mcs51)
14 ASSERT ((unsigned char)(v >> 16) == 0x80);
15 #endif
18 void
19 f2 (const void * p)
21 unsigned long v = (unsigned long)p;
23 #if defined(__SDCC_mcs51)
24 ASSERT ((unsigned char)(v>>16)==0x80);
25 #endif
28 void
29 testBug (void)
31 f1(5, (__code void *)0x1234);
32 f2((__code void *)0x1234);