OK, this turns out to be more serious: The command-line compiler seems to produce this error even when optimization is turned off.
A small example program to reproduce this:
void testfn(unsigned long * fn_param)
{
*(fn_param) = 247 - *(fn_param);
}
/* Command line:
mwccmcf.exe -c -g -opt none,dump -dis -o testpeep.dis testpeep.c
*/This produces the following code:
; 3: *(fn_param) = 247 - *(fn_param);
;
0x00000008 0x203C000000F7 move.l #247,d0 ; '....'
0x0000000E 0x9190 sub.l d0,(a0)
I tried some other options, but the result is always the same.
I'll filea bug report for this, since I know of no workaround, and this therefore means that our command-line based make-system will produce invalid code.
If someone finds a workaround for this problem (using the command-line compiler) I'd be very interested!
Regards,
Johan