[Bug fortran/88678] [9 regression] Many gfortran.dg/ieee/ieee_X.f90 test cases fail starting with r267465

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Jan 31 11:17:00 GMT 2019


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

--- Comment #22 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to nsz from comment #21)
> this fix undid the change for bug 78314
> do you plan to backport it to gcc 7,8 branches ?
> 
> note that in principle on targets where trapping is not supported
> the "immediate alternate exception handling" mechanism of ieee 754
> can be emulated by save/clear/check/restore status flags around each
> fp operation, but i don't think gcc currently supports that
> (and it's not very practical unless somebody uses it for debugging
> fp issues).

IMO, the PR78314 fix was wrong. As is the case with real HW support, there can
be exception flags already set in the status register, and trying to determine
support for traps by enabling and disabling the mask will surely trigger the
trap.

This approach from PR78314 triggers traps on x86 and PowerPC. The former
doesn't use fpu-glibc.h, so it was immune to the PR78314 change.


More information about the Gcc-bugs mailing list