re PR fortran/48979 (FRACTION und EXPONENT return invalid results for infinity/NaN)
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sun, 19 Oct 2014 20:49:27 +0000 (20:49 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sun, 19 Oct 2014 20:49:27 +0000 (20:49 +0000)
commit565fad70aa35e354b628c5f94639e543a631e8e8
tree39651a3e49d77383e3e4a37e968c07e84d8809ac
parentd856054bc7b4d494010234816bcb25e837eea3b1
re PR fortran/48979 (FRACTION und EXPONENT return invalid results for infinity/NaN)

PR fortran/48979

* trans-const.c (gfc_build_nan): New function.
* trans-const.h (gfc_build_nan): New prototype.
* trans-intrinsic.c (gfc_conv_intrinsic_exponent): Handle special
values.
(gfc_conv_intrinsic_minmaxval): Use gfc_build_nan.
(gfc_conv_intrinsic_fraction): Handle special values.
(gfc_conv_intrinsic_spacing): Likewise.
(gfc_conv_intrinsic_rrspacing): Likewise.
(gfc_conv_intrinsic_set_exponent): Likewise.

* gfortran.dg/ieee/intrinsics_2.F90: New test.

From-SVN: r216443
gcc/fortran/ChangeLog
gcc/fortran/trans-const.c
gcc/fortran/trans-const.h
gcc/fortran/trans-intrinsic.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/ieee/intrinsics_2.F90 [new file with mode: 0644]