In [r10486], an arithmetic test from GCC 8.2 was added to the SDCC regression tests.
The test has multiple parts - the signed long long part fails for all backends except mcs51. The unsigned long long part passes for most backends, but fails for ds390 and hc08/s08. This bug report is about hc08/s08.
To reproduce, remove the preprocessor guard in tests/gcc-torture-execute-arith-rand-ll.c.
Philipp
I'm most likely going to disable the whole longlong.c regression test for hc08 as it overflows the zero page with spill locations.
Shouldn't we get a linker error on such an overflow instead of a failure at runtime?
Philipp
Yes, we should. And with my local modifications (not ready yet) I do and thus observe that it was silently overflowing before. I suspect that the hc08 simulator treats addresses below 0x80 as RAM as well.
I'm now trying to split the longlong.c tests in three parts so it will fit. If that succeeds we can continue to perform these tests.
Same root cause as [#2704] and likewise fixed by [r11119
Related
Bugs:
#2704