------- 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