14 unsigned long *gp
= &gv
;
16 unsigned int gi
= (unsigned int) &gv
;
17 unsigned long gl
= (unsigned long) &gv
;
18 unsigned char gc
= (unsigned char) &gv
;
31 unsigned long *lp
= &lv
;
32 unsigned char lc
= (unsigned char) &lv
;
33 unsigned int li
= (unsigned int) &lv
;
34 unsigned long ll
= (unsigned long) &lv
;
35 #ifndef __SDCC_pdk14 // Not enough RAM
36 struct bugtest ls
= {(unsigned int) &lv
, (unsigned char) &lv
, (unsigned long) &lv
};
39 ASSERT (gc
== (unsigned char) gp
);
40 ASSERT (gi
== (unsigned int) gp
);
41 ASSERT (gl
== (unsigned long) gp
);
43 ASSERT (gs
.i
== (unsigned int) gp
);
44 ASSERT (gs
.c
== (unsigned char) gp
);
45 ASSERT (gs
.l
== (unsigned long) gp
);
47 ASSERT (lc
== (unsigned char) lp
);
48 ASSERT (li
== (unsigned int) lp
);
49 ASSERT (ll
== (unsigned long) lp
);
51 #ifndef __SDCC_pdk14 // Not enough RAM
52 ASSERT (ls
.i
== (unsigned int) lp
);
53 ASSERT (ls
.c
== (unsigned char) lp
);
54 ASSERT (ls
.l
== (unsigned long) lp
);