Hi FX,
Am 02.01.22 um 11:50 schrieb FX via Fortran:
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
I think this patch breaks the testsuite, since the directive
! { dg-additional-sources signaling_1_c.c }
should rather read
! { dg-additional-sources "signaling_1_c.c" }
At least this is similar what I see in other testcases.
Harald