This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35617] New: read namelist error
- From: "pletzer at txcorp dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2008 17:33:17 -0000
- Subject: [Bug fortran/35617] New: read namelist error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hi: It seems that gfortran can get confused about namelists that include 2 ! on
the same line. The following code fails to execute properly with gfortran
4.3.0:
cat > t.nml <<EOF
&nbdrive_naml
!nstep_stop = 2 ! uncomment to save restart data and halt after 1st step
!nstep_start = 2 ! uncomment to restart on 2nd step using saved restart data
mhdpath = 'EFIT:efit_d3d_99411_195.dat'
EOF
cat > t.f90 <<EOF
program test
character(len=128) :: mhdpath
namelist /nbdrive_naml/ mhdpath
open(10, file='t.nml')
read(10, nbdrive_naml)
close(10)
write(*, nbdrive_naml)
end program test
EOF
gfortran t.f90
./a.out
At line 5 of file t.f90 (unit = 10, file = 't.nml')
Fortran runtime error: End of file
--
Summary: read namelist error
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pletzer at txcorp dot com
GCC build triplet: GNU Fortran (GCC) 4.3.0
GCC host triplet: Linux quartic.txcorp.com 2.6.19-1.2288.fc5
GCC target triplet: x86_64 x86_64 GNU/Linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35617