This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35627] [4.3, 4.4 regression] namelist read error
- 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: 20 Mar 2008 01:17:17 -0000
- Subject: [Bug fortran/35627] [4.3, 4.4 regression] namelist read error
- References: <bug-35627-15934@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from jvdelisle at gcc dot gnu dot org 2008-03-20 01:17 -------
Created an attachment (id=15348)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15348&action=view)
A final patch
l_push_char assumes the index which is item_count has been set to zero and
after saving a character it bumps the index. This bug has been latent for a
long time, Forgot to set item_count back to zero when when freeing the
line_buffer.
The simplest fix is this:
@@ -741,6 +742,7 @@ read_logical (st_parameter_dt *dtp, int
bad_logical:
+ dtp->u.p.item_count = 0;
free_line (dtp);
if (nml_bad_return (dtp, c))
However, I am going to move this reseting into free_line where it ought to be.
The attachment is the final fix with some cleanup. Regression tested on
x86-64. I will commit as obvious with the new test case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35627