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: 8 Mar 2007 05:51:57 -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 #14 from jvdelisle at gcc dot gnu dot org 2007-03-08 05:51 -------
Here is a patch. Herald, do you want to see if this fixes it for you.
I tested here, but it does not hurt to test some more.
Index: file_pos.c
===================================================================
--- file_pos.c (revision 122529)
+++ file_pos.c (working copy)
@@ -311,7 +311,6 @@ st_rewind (st_parameter_filepos *fpp)
u->endfile = NO_ENDFILE;
u->current_record = 0;
- u->bytes_left = 0;
u->strm_pos = 1;
u->read_bad = 0;
test_endfile (u);
I will prepare a submittal to the list and a test case in the next few days,
but this will get you going I hope.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31052