blob: 5ffe2dad27e82c6abccb39f4c7e85903939dcf86 [file] [log] [blame]
! { dg-do run }
! PR36657 Namelist string constant immediately followed by comment
program gfcbug79
implicit none
integer, parameter :: nnml = 10
character(len=8) :: model = ""
namelist /NML/ model
open (nnml, status="scratch")
write(nnml,*) "&nml! This is a just comment"
write(nnml,*) " model='foo'! This is a just comment"
write(nnml,*) "/"
rewind(nnml)
read (nnml, nml=NML)
if (model /= 'foo') STOP 1
close(nnml)
end program gfcbug79