gcc/testsuite/gfortran.dg/isnan_2.f90
raw| 1 | ! Test for the ISNAN intrinsic on constants |
| 2 | ! |
| 3 | ! { dg-do run } |
| 4 | ! { dg-options "-fno-range-check" } |
| 5 | ! { dg-add-options ieee } |
| 6 | ! |
| 7 | implicit none |
| 8 | character(len=1) :: s |
| 9 | write(s,'(L1)') isnan(0.) |
| 10 | if (s /= 'F') STOP 1 |
| 11 | |
| 12 | write(s,'(L1)') isnan(exp(huge(0.))) |
| 13 | if (s /= 'F') STOP 2 |
| 14 | |
| 15 | write(s,'(L1)') isnan(0./0.) |
| 16 | if (s /= 'T') STOP 3 |
| 17 | end |