Imported Upstream version 2.9.0
[debian/cc1111] / support / regression / tests / bug1921073.c
1 /*
2     bug 1921073
3 */
4
5 #include <testfwk.h>
6
7 void f1(char c, const void * p)
8 {
9         unsigned long v = (unsigned long)p;
10         c;
11         v;
12 #if defined(SDCC_mcs51)
13         ASSERT((unsigned char)(v>>16)==0x80);
14 #endif
15 }
16
17 void f2(const void * p)
18 {
19         unsigned long v = (unsigned long)p;
20         v;
21 #if defined(SDCC_mcs51)
22         ASSERT((unsigned char)(v>>16)==0x80);
23 #endif
24 }
25
26 void
27 testBug(void)
28 {
29         f1(5, (code void *)0x1234);
30         f2((code void *)0x1234);
31 }