blob: db8f5695cdf979fc9426e339b285c07b70191a2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
! Test for the ISNAN intrinsic
!
! { dg-do run }
! { dg-options "-pedantic-errors -mieee" { target sh*-*-* } }
!
implicit none
real :: x
x = -1.0
x = sqrt(x)
if (.not. isnan(x)) call abort
x = 0.0
x = x / x
if (.not. isnan(x)) call abort
x = 5.0
if (isnan(x)) call abort
x = huge(x)
x = 2*x
if (isnan(x)) call abort
end
|