1 ! { dg-do run { target fd_truncate } }
2 ! { dg-add-options ieee }
6 ! Check that namelists and the real values Inf, NaN, Infinity
11 real , DIMENSION(11) ::foo
14 NAMELIST /nl
/ infinity
18 open (10, status
="scratch")
20 write (10,*) " &nl foo = 5, 5, 5, nan, infinity, infinity "
22 write (10,*) " = 1, /"
27 if(infinity
/= 1) STOP 1
28 if(any(foo(1:3) /= [5.0, 5.0, 5.0]) .or
. .not
.isnan(foo(4)) &
29 .or
. foo(5) <= huge(foo
) .or
. any(foo(6:11) /= -1.0)) &
35 open (10, status
="scratch")
37 write (10,'(a)') "&nl foo = 5, 5, 5, nan, infinity, infinity"
38 write (10,'(a)') "=1,/"
43 if(infinity
/= 1) STOP 3
44 if(any(foo(1:3) /= [5.0, 5.0, 5.0]) .or
. .not
.isnan(foo(4)) &
45 .or
. foo(5) <= huge(foo
) .or
. any(foo(6:11) /= -1.0)) &