As we can see on the snapshots page, the regression tests crash sdcc for ds390 on Windows on amd64:
/home/sdcc-builder/build/sdcc-build/orig/sdcc/support/regression/fwk/lib/testfwk.c:136: error 9: FATAL Compiler Internal Error in file '/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/ds390/gen.c' line number '1945' : need pointerCode
Fixing [bugs:#3669] (so SDCC will cross-compile on current GNU/Linux hosts) will make debugging this one much easier.
Related
Bugs:
#3669Looks like the bug can be reproduced using Debian GNU/Linux on x86 (I did so in a qemu VM).
Last edit: Philipp Klaus Krause 2023-10-27
It looks like we have a problem in round 0 of generalized constant propagation that results in the argument to RtcRead in ds390/rtc390.c incorrectly being annotated as being a null-pointer. This later results in the crash in code generation, when the ds390 backend tries to generate code that writes to this null pointer.
Why this only happens on GNU/Linux on x86, but not amd64, I don't know yet.
This turned out to be a bug affecting host systems where sizeof(long) < sizeof(long long), which is GNU/Linux on x86 and Windows on both x86 and amd64.
Fixed in [r14392].
Related
Commit: [r14392]