blob: 35ea667d3b9316741db833ab8b90a5eea0ab0cdf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
! { dg-do run { target fd_truncate } }
!
! PR fortran/34530
!
! Skipping over comment line was not working
!
! Test case contributed by Harald Anlauf.
!
program gfcbug77
implicit none
character(len=128) :: file = ""
logical :: default
namelist /BLACKLIST/ file, default
integer, parameter :: nnml = 10
default = .true.
open (nnml, file='gfcbug77.nml')
write(nnml,*) "&blacklist " ! The trailing space breaks gfortran
write(nnml,*) " ! This is a comment within the namelist"
write(nnml,*) " file = 'myfile'"
write(nnml,*) " default = F"
write(nnml,*) "/"
rewind(nnml)
read (nnml, nml=BLACKLIST)
close(nnml,status="delete")
if(file /= "myfile" .or. default) call abort()
! write (*,nml=BLACKLIST)
end program gfcbug77
|