re PR fortran/48979 (FRACTION und EXPONENT return invalid results for infinity/NaN)
authorFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 11 Oct 2014 16:57:32 +0000 (16:57 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 11 Oct 2014 16:57:32 +0000 (16:57 +0000)
commitd2af8cc6f1463ea098b2d9fbac82f0f3c85b8e7b
tree2b3f28f90b67f144acb6a1a5932060e2f869c5be
parentf3ca7111fb5fd4810c784f9887c50e45849fc7ec
re PR fortran/48979 (FRACTION und EXPONENT return invalid results for infinity/NaN)

PR fortran/48979

* simplify.c (gfc_simplify_atan): Use mpfr_zero_p to check for zeros.
(gfc_simplify_log): Likewise.
(gfc_simplify_scale): Likewise.
(gfc_simplify_exponent): Handle infinities and NaNs.
(gfc_simplify_fraction): Handle infinities.
(gfc_simplify_rrspacing): Handle signed zeros and NaNs.
(gfc_simplify_set_exponent): Handle infinities and NaNs.
(gfc_simplify_spacing): Handle zeros, infinities and NaNs.

* gfortran.dg/ieee/intrinsics_1.f90: New test.

From-SVN: r216120
gcc/fortran/ChangeLog
gcc/fortran/simplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/ieee/intrinsics_1.f90 [new file with mode: 0644]