This is the mail archive of the gcc-bugs@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]

[Bug c/84190] [7 Regression] double arithmetic on x86 no longer rounds to nearest


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84190

--- Comment #5 from Bruno Haible <bruno at clisp dot org> ---
(In reply to joseph@codesourcery.com from comment #4)
> You need to use -fexcess-precision=standard (or -msse2 -mfpmath=sse) for 
> predictable results from double arithmetic on 32-bit x86.  If you do that, 
> do you still see such a problem?

If I pass -fexcess-precision=standard or -mfpmath=sse (no need for -msse2 in
this case), the test passes.

However, something has evidently changed (regressed) in the inliner: 'volatile
double', put in sufficiently many places, has the same effect as
-fexcess-precision=standard (before gcc 7 and in gcc 7). What has changed, is
that if I have 'volatile double' only in the signature of the 'equalfn'
function that gets inlined, since gcc 7 this information that the values should
be passed as IEEE doubles (discarding excess precision) gets lost.

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