For the following code:
char test(char *p, int i, char c)
{
p[0] = c;
p[i] = 8;
return p[0];
}
current SDCC 3.9.5 #11483 (I didn't check older versions) will always return c. I saw this bug for all ports I tried (mcs51, z80, stm8, hc08).
Apparently, the bug is introduced in a computeDataFlow (ebbi) call.
Giving this higher than default priority, since bad code is generated silently.
Philipp
In [r11485], I added a (currently disabled) test for this bug.
Fixed in [r13788]
Related
Commit: [r13788]