Hello SDCC team,
Here is a small crash i found. It happens when compiling the following:
void x(unsigned char *y) { unsigned char a; y[0] = 2; return 1; }
Flags: -mstm8 --debug --out-fmt-elf -c main.c -o main.rel
The reason is that the dwarf2 outputter cannot handle incomplete generated data.
The easy fix is to just not process the dwarf output if there is a fatal error. There is no need for it anyway as there are no output files when a fatal error occurs.
The patch adds a check for this fixing the problem.
Thanks,
/pedro
Just for the record this is an ICE not a real crash if you where wondering... :-)