[Bug fortran/46010] I/O: Namelist-reading bug
marco at hulten dot org
gcc-bugzilla@gcc.gnu.org
Thu Oct 14 18:16:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46010
--- Comment #5 from Marco van Hulten <marco at hulten dot org> 2010-10-14 18:15:59 UTC ---
(In reply to comment #4)
> [...]
> The issue is really the ".true." ("T","true", ".false.", "F", "false"). If the
> last item (in the namelist and in the derived type) is an integer or a string
> it works.
No, that doesn't seem to be the issue. I tried both your minimal test case as
well as my test case, with an added character as well as an added number, but
all give the following result:
marco@graviton testje $ gfortran -std=f2003 test.f90
marco@graviton testje $ ./a.out
&NAMTOPTRC
TRACER(1)%SNAME="Aa",
TRACER(1)%LINI=T,
TRACER(1)%GETAL= 1,
TRACER(2)%SNAME="Bb",
TRACER(2)%LINI=T,
TRACER(2)%GETAL= 1,
TRACER(3)%SNAME="Cc",
TRACER(3)%LINI=T,
TRACER(3)%GETAL= 1,
/
marco@graviton testje $ gfortran test.f90
marco@graviton testje $ ./a.out
At line 13 of file test.f90 (unit = 99, file = 'nml.dat')
Fortran runtime error: Bad data for namelist object tracer%getal
More information about the Gcc-bugs
mailing list