summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/namelist_50.f90
blob: 57e93fcbf25ba24a3030f340d1e8c2c193aadb0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! { 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') call abort
  close(nnml)
end program gfcbug79