OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
db8f5695cdf979fc9426e339b285c07b70191a2b
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gfortran.dg
/
isnan_1.f90
1
! Test for the ISNAN intrinsic
2
!
3
! { dg-do run }
4
! { dg-options "-pedantic-errors -mieee" { target sh*-*-* } }
5
!
6
implicit none
7
real :: x
8
x = -1.0
9
x = sqrt(x)
10
if (.not. isnan(x)) call abort
11
x = 0.0
12
x = x / x
13
if (.not. isnan(x)) call abort
14
15
x = 5.0
16
if (isnan(x)) call abort
17
x = huge(x)
18
x = 2*x
19
if (isnan(x)) call abort
20
end