The attached code nakes sdcc 3.2.1 #8062 invoked using --std-c99 -mz80 --opt-code-size test.c crash giving
test.c:36: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
test.c:42: error 9: FATAL Compiler Internal Error in file 'gen.c' line number '1555' : Symbol in register, but no register assigned.
Contact Author with source code
Symbol iTemp21 at ic 18.
Caught signal 11: SIGSEGV
This seems to be some weird interaction of register allocation and builtin functions.