[PATCH] Fortran: detect signaling NaNs on targets without issignaling macro in libc
FX
fxcoudert@gmail.com
Sun Jan 16 23:11:59 GMT 2022
This patch is the third in my “signaling NaN” series. For targets with IEEE support but without the issignaling macro in libc (i.e., everywhere except glibc), this allows us to provide a fallback implementation. In order to keep the code in ieee_helper.c relatively readable, I’ve put that new implementation in a separate file, issignaling_fallback.h.
The logic is borrowed from different routines in glibc, but gathered into a single file and much simpler than the glibc implementation, because we do not need to cover all the cases they have (comments with details are available in issignaling_fallback.h).
I can’t test this on all the targets I’d like to, obviously. But it was tested on x86_64-pc-linux-gnu (where it doesn’t do anything), on x86_64-pc-linux-gnu by mimicking the lack of a issignaling macro, and on x86_64-apple-darwin (which does not have issignaling).
OK to push?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: issignaling.diff
Type: application/octet-stream
Size: 9014 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20220117/4afd5d5e/attachment.obj>
More information about the Fortran
mailing list