2 ! { dg-options "-fno-range-check" }
3 ! { dg-add-options ieee }
4 ! { dg-skip-if "NaN not supported" { spu-*-* } }
8 ! Infinity and NaN were not properly written to the .mod file.
12 real, parameter :: inf
= 1./0., nan
= 0./0., minf
= -1./0.0
18 character(len
=20) :: str
19 if (log(abs(inf
)) < huge(inf
)) STOP 1
20 if (log(abs(minf
)) < huge(inf
)) STOP 2
21 if (.not
. isnan(nan
)) STOP 3
22 write(str
,"(sp,f10.2)") inf
23 if (adjustl(str
) /= "+Infinity") STOP 4
25 if (adjustl(str
) /= "-Infinity") STOP 5
27 if (adjustl(str
) /= "NaN") STOP 6