This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35617] [4.3, 4.4 Regression] read namelist 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: 18 Mar 2008 04:25:35 -0000
- Subject: [Bug fortran/35617] [4.3, 4.4 Regression] read namelist error
- References: <bug-35617-15934@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2008-03-18 04:25 -------
Naturally, the patch in comment #2 breaks namelist_44.f90 (I say that because,
after all, we are up to 44 namelist test cases, and about to go to 45 :) )
Nevertheless, this fixes it and passes regression.
Index: list_read.c
===================================================================
--- list_read.c (revision 133275)
+++ list_read.c (working copy)
@@ -356,6 +356,11 @@ eat_separator (st_parameter_dt *dtp)
{
eat_line (dtp);
c = next_char (dtp);
+ if (c == '!')
+ {
+ eat_line (dtp);
+ c = next_char (dtp);
+ }
}
}
while (c == '\n' || c == '\r' || c == ' ');
eatline leaves us pointing to the first character of the next line, which we
then get, which causes the while loop to exit, followed by an unget. So the
next get char will get a '!' which is nonsense and can not be matched. The
patch circumvents this special case.
I will commit as obvious to trunk and then to 4.3 in a few days.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35617