failing test case:
static unsigned int Val = 0x1234;
static unsigned int *pVal = &Val;
ASSERT(*pVal == Val);
the dereference works fine if the storage attribute is specified or the pointer is not static:
data static unsigned int *pVal = &Val;
unsigned int *pVal = &Val;
verified with sdcc version:
$ ../../bin/sdcc -v
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.7.4 #4977 (Nov 17 2007) (UNIX)
This is the reason why the regression test bug1399290 fails on pic16 target.
Log in to post a comment.