This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Aug 2011 09:11:21 +0000
- Subject: [Bug fortran/50109] [4.3/4.4/4.5/4.6 Regression] Formatted namelist read with multiple "!" fails with: Cannot match namelist object name !
- Auto-submitted: auto-generated
- References: <bug-50109-4@http.gcc.gnu.org/bugzilla/>
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)