struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug1994062.c.in
blobe39687f2e36a9a78c6b323a8b64c82dedef127bc
1 /** bug1994062.c
3 sign: signed, unsigned
4 */
6 #include <testfwk.h>
8 /*
9 8051 code miscompares idata char* pointers.
10 It does signed compare instead of unsigned.
11 And I offer an optimzation that can't be peepholed, at least not by me.
12 2.7.0 and 2.8.0 are identical with respect to this bug. 2.8.0 generates a false warning from the linker.
14 Also for xdata it generates error 47: indirections to different types assignment
15 from type 'unsigned-char near* '
16 to type 'unsigned-char xdata* '
19 {sign} char _STATMEM *one;
20 {sign} char _STATMEM *two;
21 {sign} char chunk[20];
23 void testBug(void)
25 one = chunk;
26 two = &one[140];
27 ASSERT (one < two);