The attached file contains three functions with slightly hairy nested while/if structures. The sdcc version is from SVN today (rev 5085)
rw@woodstock:~$ sdcc -v
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.0 # (Mar 10 2008) (UNIX)
rw@woodstock:~$ sdcc -mpic16 test_cross.c
test_cross.c:22: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
test_cross.asm:246:Error [116] Value of symbol "_00135_DS_" differs on second pass
pass 1=52, pass 2=30
test_cross.asm:246:Error [115] Duplicate label or redefining symbol that cannot be redefined. (_00135_DS_)
rw@woodstock:~$
is the result.
If the "#define PARTA" is commented out, it compiles fine (Apart from the issue with the lack of main())
rw@woodstock:~$ sdcc -mpic16 test_cross.c
test_cross.c:22: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
test_cross.c:31: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
message: using default linker script "/usr/share/gputils/lkr/18f452.lkr"
Triggers compiler bug - could be test case
Logged In: YES
user_id=846991
Originator: YES
Seems to be fixed in SVN 5134.
Logged In: YES
user_id=1115835
Originator: NO
The problem persisted and is fixed only in SDCC 2.8.1, r5162.
Thank you for the testcase.