1 !{ dg-do run { target fd_truncate } }
2 ! Tests namelist on logical variables
3 ! provided by Paul Thomas - pault@gcc.gnu.org
6 logical, dimension(2) :: l
8 l
= (/.true
., .false
./)
10 open (10, status
= "scratch")
11 write (10, '(A)') "&mynml l = F T /"
14 read (10, mynml
, iostat
= ier
)
15 if (ier
.ne
. 0) call abort ()
18 open (10, status
= "scratch")
19 write (10, mynml
, iostat
= ier
)
20 if (ier
.ne
. 0) call abort ()
23 l
= (/.true
., .false
./)
24 read (10, mynml
, iostat
= ier
)
25 if (ier
.ne
. 0) call abort ()
28 if (l(1) .or
. (.not
.l(2))) call abort ()
30 end program namelist_17