This bug prevents coremark from compiling.
sdcc -v
3.6.5 #9842 (MINGW64)
Test program:
extern int printf(char *fmt, ...); void main(void) { unsigned int i; for (i=0; i<20; ++i) printf("%lu\n", 1<<(unsigned long)i); }
sdcc -mz80 -S test.c
The compiler just hangs.
Combinations of the shift expression with the same type on both sides of the << operator do compile successfully:
(unsigned long)1<<(unsigned long)i 1<<i
I put in "Front End" but this seems to be a z80-related problem.
Áccording to a few stacktraces from gdb, it seems SDCC hangs in genLeftShift in code generation in the Z80 backend.
Philipp
Fixed in revision #9852.
Philipp