This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33039] Read NAMELIST: reads wrong namelist name
- 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: 9 Aug 2007 23:27:05 -0000
- Subject: [Bug fortran/33039] Read NAMELIST: reads wrong namelist name
- References: <bug-33039-14922@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2007-08-09 23:27 -------
Regarding the test case:
&code char='Improper lower case name',X=-3.0/
Fortran 95 Standard 10.9.1 states:
"If a processor is capable of representing letters in both upper and lower
case, a group name or object name is without regard to case. "
So lower case is not improper.
The standard also states that at least one space is required after the namelist
name. This patch fixes it:
Index: list_read.c
===================================================================
--- list_read.c (revision 127265)
+++ list_read.c (working copy)
@@ -2592,6 +2592,13 @@ find_nml_name:
if (dtp->u.p.nml_read_error)
goto find_nml_name;
+
+ c = next_char (dtp);
+ if (c != ' ')
+ {
+ unget_char (dtp, c);
+ goto find_nml_name;
+ }
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33039