blob: e9506c2d0c5454ef2ba79bc756cc8c99380e5b5c [file] [log] [blame]
! Test for the ISNAN intrinsic
!
! { dg-do run }
! { dg-add-options ieee }
!
implicit none
real :: x
x = -1.0
x = sqrt(x)
if (.not. isnan(x)) STOP 1
x = 0.0
x = x / x
if (.not. isnan(x)) STOP 2
x = 5.0
if (isnan(x)) STOP 3
x = huge(x)
x = 2*x
if (isnan(x)) STOP 4
end