2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / namelist_45.f90
blob2357223676b8957858bc111c676b4f2cb7f6a0d0
1 ! { dg-do run { target fd_truncate } }
2 ! PR35617 read namelist error with '!'
3 program test
4 character(len=128) :: mhdpath
5 namelist /nbdrive_naml/ mhdpath
6 open(10, file='test.nml')
8 write(10,'(a)') "&nbdrive_naml"
9 write(10,'(a)')
10 write(10,'(a)') "!nstep_stop = 2 ! uncomment to bar"
11 write(10,'(a)') "!nstep_start = 2 ! uncomment to foo"
12 write(10,'(a)') " mhdpath = 'mypath.dat'"
13 write(10,'(a)') "/"
15 rewind(10)
16 read(10, nbdrive_naml)
17 close(10,status="delete")
18 end program test