This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/31052] Bad IOSTAT values when readings NAMELISTs past EOF
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2007 04:45:48 -0000
- Subject: [Bug libfortran/31052] Bad IOSTAT values when readings NAMELISTs past EOF
- References: <bug-31052-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from jvdelisle at gcc dot gnu dot org 2007-03-07 04:45 -------
The garbled text is because gfortran does not default initialize variable as
some compilers do. The 'line' variable is not getting read because gfortran is
getting an error on the read, so the it is not set to anything. Put a: line=""
at the top of the subroutine to get around that.
After this you can see that IOS is set to -1, so 'line' is not read.
I am now going to study the REWIND and BACKSPACE and see what we should be
doing differently if anything.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31052