------- Comment #1 from pletzer at txcorp dot com 2008-03-17 18:32 ------- (In reply to comment #0)
Oops, the failing namelist was: &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' / and the erro message is Fortran runtime error: Cannot match namelist object name !nstep_start Note: the initial blank line is essential in order to reproduce the problem. Thanks for your help. --Alex > 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 > -- pletzer at txcorp dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|read namelist error |read namelist error http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35617