2008-07-06 Kai Tietz <kai.tietz@onevision.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / isnan_1.f90
blobdb8f5695cdf979fc9426e339b285c07b70191a2b
1 ! Test for the ISNAN intrinsic
3 ! { dg-do run }
4 ! { dg-options "-pedantic-errors -mieee" { target sh*-*-* } }
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
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