[Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 18 09:37:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-18 09:11:21 UTC ---
Draft patch:
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -345,28 +345,19 @@ eat_separator (st_parameter_dt *dtp)
do
{
if ((c = next_char (dtp)) == EOF)
return LIBERROR_END;
if (c == '!')
{
err = eat_line (dtp);
if (err)
return err;
- if ((c = next_char (dtp)) == EOF)
- return LIBERROR_END;
- if (c == '!')
- {
- err = eat_line (dtp);
- if (err)
- return err;
- if ((c = next_char (dtp)) == EOF)
- return LIBERROR_END;
- }
+ c = '\n';
}
}
while (c == '\n' || c == '\r' || c == ' ' || c == '\t');
unget_char (dtp, c);
}
break;
case '!':
if (dtp->u.p.namelist_mode)
More information about the Gcc-bugs
mailing list