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: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2008 18:29:48 -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 #8 from burnus at gcc dot gnu dot org 2008-03-19 18:29 -------
> So this is why I suspect the read_logical may have an off by one leftover
I think you are right. In that sense it is an only bug which was only exposed
by the new NaN support.
Not very elegent, but the following works. One should probably do an audit of
all l_push_char. The following works here, but I do not understand why element
[0] was '\0' and not something else.
Index: libgfortran/io/list_read.c
===================================================================
--- libgfortran/io/list_read.c (Revision 133342)
+++ libgfortran/io/list_read.c (Arbeitskopie)
@@ -680,6 +680,7 @@ read_logical (st_parameter_dt *dtp, int
break;
CASE_SEPARATORS:
+ dtp->u.p.item_count--;
unget_char (dtp, c);
eat_separator (dtp);
return; /* Null value. */
@@ -741,6 +742,7 @@ read_logical (st_parameter_dt *dtp, int
bad_logical:
+ dtp->u.p.item_count--;
free_line (dtp);
if (nml_bad_return (dtp, c))
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35627