This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-fstrict-fp-semantics (was Re: numerical instability and estimate-probability)


OK, now the GCC developers themselves have gotten bitten on the ass (sorry,
Jan ;-) by the fact that gcc generates different FP code that gives different FP
results depending on what specific optimizations have been invoked.

It has been a principle forever that adding -g to the compiler options does
not change the code *one bit*.

Can we adopt an option, say -fstrict-fp-semantics, that means that fp
results are not changed *one bit* by any optimization?

That doesn't mean that the results aren't different if the host machines
are different.  This is allowed even by two different IEEE 754 conforming
machines (at least if one of them is an x86 or 68K and the other is your
typical RISC platform).

But it does mean that implementing the principles elucidated by Toon Moene in

http://gcc.gnu.org/ml/gcc/1999-07n/msg00696.html

and by me in

http://gcc.gnu.org/ml/gcc-patches/2001-03/msg00466.html

are the only sane way to really fix this problem.

Toon says in

http://gcc.gnu.org/ml/gcc-patches/2001-03/msg00481.html

that the conclusion of his previous e-mail was that "this
would be useful to add to GCC, but no-one was stepping forward to do
the work."  Now that this problem affects the very operation of GCC
itself, perhaps someone will want to fix it.

Brad Lucier


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]