[PATCH] Fortran: make IEEE_CLASS recognize signaling NaNs

FX fxcoudert@gmail.com
Sun Jan 9 10:52:11 GMT 2022


ping


> Le 2 janv. 2022 à 11:50, FX <fxcoudert@gmail.com> a écrit :
> 
> Hi,
> 
> This is the first part of a three-patch series to fix PR 82207 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82207), making gfortran handle signaling NaNs. This part fixes the library code implementing IEEE_CLASS, by using the issignaling macro (from TS 18661-1:2014) to check whether a NaN is signalling.
> 
> The patch comes with a testcase, conditional on issignaling support (which will therefore run on glibc targets), which uses C built-ins to generate signaling NaNs and checks in Fortran code that they are classified and behave as expected.
> 
> Once this is in, the next two parts are:
> 
> - Add support for generating signaling NaNs in IEEE_VALUE, which is a longer patch because it requires moving the IEEE_VALUE library code from Fortran to C (but will be much more efficient and correct than the current implementation).
> - Provide a fallback implementation of issignaling on targets that don’t have it.
> 
> 
> Bootstrapped and regtested on x86_64-pc-gnu-linux. OK to commit?
> 
> FX
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fortran-Allow-IEEE_CLASS-to-identify-signaling-NaNs.patch
Type: application/octet-stream
Size: 8330 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20220109/e12eac21/attachment.obj>


More information about the Gcc-patches mailing list