gcc on Intel x86 and failure of -ffloat-store option

Stephen L Moshier moshier@mediaone.net
Fri Dec 31 20:54:00 GMT 1999

> This is a serious bug, since the whole point of the -ffloat-store
> option is to get IEEE 754-conformant behavior, and the behavior should
> not depend on optimization level.

I think the behavior of float-store has not changed materially since
it was implemented in 1988 or so.  It is strange that you waited so
long to complain :)  Roughly speaking, the flag works on explicitly
declared user variables.  It does not work on compiler-generated
variables.  The problem with that is the user cannot tell when the
compiler will decide to introduce a compiler-generated variable.  Thus
the flag has never worked well enough to be really usable.

The only sure and portable way I know to force a store out to memory
from the i386 fpu is to declare the memory variable to be volatile.

More information about the Gcc-bugs mailing list