Compiling the attached example (a modified variant of the fbench benchmark) using SDCC 3.8.0 RC1 makes SDCC hang. The GDB backtrace shows it is in data flow analysis (computeDataFlow), and it keeps allocating memory.
I first noticed this compiling via sdcc -mstm8 fbench_ansi.c, but I see the problem for -mz80, too, and assume it happens for all targets.
Philipp
I still see this issue as of [r13822].
Related
Commit: [r13822]
The attached code is simplified further, but still reproduces the issue. Unfortunately, while much smaller than the previous one, it is still 353 lines.
Edit: Deleted attachment. The simplified code turned out to not reproduce the hang, it just took very long to compile.
Last edit: Philipp Klaus Krause 2023-03-10
Having another look at this, even for the original code, SDCC does not really hang, and does not really keep allocating more and more memory.
Trying to reproduce this on a fast machine, I was able to compile the code with SDCC in about 20 min using about 20 GB of RAM.
Last edit: Philipp Klaus Krause 2023-03-10