https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82207
--- Comment #2 from kargl at gcc dot gnu.org ---
See gcc/gcc/libgfortran/ieee/ieee_helper.c lines 75-79:
if (res == IEEE_QUIET_NAN) \
{ \
/* TODO: Handle signaling NaNs */ \
return res; \
} \
See also gcc/gcc/libgfortran/ieee/ieee_arithmetic.F90
lines 860-871
elemental real(kind=4) function IEEE_VALUE_4(X, CLASS) result(res)
real(kind=4), intent(in) :: X
type(IEEE_CLASS_TYPE), intent(in) :: CLASS
select case (CLASS%hidden)
case (1) ! IEEE_SIGNALING_NAN
res = -1
res = sqrt(res)
case (2) ! IEEE_QUIET_NAN
res = -1
res = sqrt(res)
It seems gfortran supports NaN, but does not make a distinction
between a quiet and a signal NaN.