void f()
{
int x;
int y;
if (x <= y)
do
;
while (y++ < 10);
}
Compiling this with sdcc test.c -mz80 results in this :
test.c:5: warning 84: 'auto' variable 'x' may be used before initialization
test.c:5: warning 84: 'auto' variable 'x' may be used before initialization
test.c:5: warning 84: 'auto' variable 'y' may be used before initialization
test.c:6: warning 84: 'auto' variable 'y' may be used before initialization
test.c:8: error 9: FATAL Compiler Internal Error in file 'gen.c' line number '1688' : Symbol in register, but no register assigned.
Contact Author with source code
Symbol iTemp1 at ic 2.
Caught signal 11: SIGSEGV
Tested with commit 11662.
Note : This also crashes with
sdcc test.c -ms08, with aCaught signal 11: SIGSEGVOther extra note : This also crashes with
sdcc test.c -mstm8, with this error message :Revision [r11667] fixes all of the problems, except for with the stm8 code generator internal error.
Related
Wiki: z80
Remainder of problem fixed with revision [r11670]