I found the attached code that makes SDCC #9439 crash with SIGSEGV on my Debian GNU/Linux system. It seems all backends are affected (tried hc08, stm8, gbz80).
When building with "sdcc test.c -c -mstm8", it seems something wrong at line 2324, file SDCCopt.c.
ebbi = iCodeBreakDown (ic);
computeControlFlow (ebbi);
A label "_eBBlock1" is eliminated, but still be refered by other ICs.
I made some modification to your original test.c.
When building with "sdcc test.c -c -mstm8", it seems something wrong at line 2324, file SDCCopt.c.
ebbi = iCodeBreakDown (ic);
computeControlFlow (ebbi);
A label "_eBBlock1" is eliminated, but still be refered by other ICs.
Fixed in [r9708]
"you are in a graph of twisty little eBBlocks, all different" -- this one was really tricky.