blob: fe77bf4717a4fe00693f9af39e2dc572342cd0a6 [file] [log] [blame]
! Test for the ISNAN intrinsic
!
! { dg-do run }
! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } }
!
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