Compiling this code e.g. for pdk15 using latest sdcc
__sfr __at(0x15) c;
void f(void)
{
c |= 0x04;
}
I see that the literal 0x04 changes type from const int to volatile unsigned char from the raw1 dump to the cse dump. Clearly there is some optimization to narrow it, which makes sense. But that optimization introduced an unecessary volatile, which prevents further optimizations.
Fixed in [r11706]. Code size went down a little bit in the existing regression tests, but I have no idea how we would create a test for this bug.