#: 6420 S12/OS9/68000 (OSK)
31-Aug-90 11:36:55
Sb: c bug
Fm: Carl Kreider 71076,76
To: all
The following source will generate bad code from both c68 and c68020 that come
with 'cc' version 3.1. Both compilers will generate a call to float sized
addition in either the library or the trap lib, depending on the option
selected. The -k=2f option (or c68020 -t881) will generate inline fpu code
that is correct. Removing '++', using the '+=' shorthand, or removing
'register' will all permit the compilers to generate correct code. They don't
get much more obscure than this!
poly()
{
double accum;
register double *rdp;
accum = accum + *rdp++;
}
|