In the regression tests three tests fail with a crash in SDCCgenconstprop.cc line 1402 for mcs51 large & huge model.
/home/sdcc-builder/build/sdcc-build/orig/sdcc/support/regression/cases/../tests/gcc-torture-execute-990804-1.c:39: error 9: FATAL Compiler Internal Error in file '/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/SDCCgenconstprop.cc' line number '1402' : code generator internal error
Contact Author with source code
gmake[5]: *** [Makefile:437: gen/mcs51-large/tst_gcc-torture-execute-990804-1.rel] Fehler 1
results/mcs51-large/tst_gcc-torture-execute-990804-1.out:2:--- FAIL: cannot compile/link cases/tst_gcc-torture-execute-990804-1.c
/home/sdcc-builder/build/sdcc-build/orig/sdcc/support/regression/cases/../tests/gcc-torture-execute-divmod-1.c:14: error 9: FATAL Compiler Internal Error in file '/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/SDCCgenconstprop.cc' line number '1402' : code generator internal error
Contact Author with source code
gmake[5]: *** [Makefile:437: gen/mcs51-large/tst_gcc-torture-execute-divmod-1.rel] Fehler 1
results/mcs51-large/tst_gcc-torture-execute-divmod-1.out:2:--- FAIL: cannot compile/link cases/tst_gcc-torture-execute-divmod-1.c
cases/onebyte/onebyte_attrL_volatile_attrR_none.c:40: error 9: FATAL Compiler Internal Error in file '/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/SDCCgenconstprop.cc' line number '1402' : code generator internal error
Contact Author with source code
gmake[6]: *** [Makefile:437: gen/mcs51-large/onebyte/onebyte_attrL_volatile_attrR_none.rel] Fehler 1
results/mcs51-large/onebyte/onebyte_attrL_volatile_attrR_none.out:2:--- FAIL: cannot compile/link cases/onebyte/onebyte_attrL_volatile_attrR_none.c
I can reproduce the issue on my Debian GNU/Linux testing system using SDCC built from current svn trunk.
Last edit: Philipp Klaus Krause 2026-07-23
The quick and easy way would be to just re-disable the assertion for mcs51. The better way would be to find out why we get the corrupted iTemp usage information for mcs51 in the first place.
Small code sample to reproduce the issue:
This case (and gcc-torture-execute-990804-1) is fixed in [r16724]. It was an issue in deleteIfx in SDCClabel.c corrupting OP_USES.
The other two tests still fail.
Related
Commit: [r16724]
Last edit: Philipp Klaus Krause 2026-07-27
Last part of the bug fixed in [r16725]. CSE could introduce iCodes not in iCodehTab.
Related
Commit: [r16725]