https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91690
Wilco <wdijkstr at arm dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wdijkstr at arm dot com --- Comment #6 from Wilco <wdijkstr at arm dot com> --- (In reply to Steve Kargl from comment #5) > On Mon, Sep 09, 2019 at 06:25:53PM +0000, wilco at gcc dot gnu.org wrote: > > > > > > The Fortran standard may require this behavior. 18-007r1 page 435 > > > > But none of that is needed since a correct implementation of isnan > > etc does not affect the floating point state at all (see PR66462). > > > > OK. So you can special case IEEE_IS_NAN(). What about > the other IEEE_ARITHMETIC functions? The same is true for the other isxxx functions from C99 and the new iszero and isdenormal. Are there other functions besides these in IEEE_ARITHMETIC? > PR66462 has been re-opened. Tamir seemed to have developed > 4 different patches, yet no one can agree on "a correct > implementation" for all targets. As his latest comments explain, Tamar's last patch is correct. That should be the default since an integer implementation which doesn't affect floating point state is the only correct one. It happens to be the fastest as well as a bonus. Either way, I don't believe the Fortran front-end should try to work around mid-end bugs. As reported a save/restore is prohibitive expensive on all targets so shouldn't even be contemplated.