This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36725] g0 edit descriptor: Missing compile-time checking for invalid g0.d
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jul 2008 08:44:29 -0000
- Subject: [Bug fortran/36725] g0 edit descriptor: Missing compile-time checking for invalid g0.d
- References: <bug-36725-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2008-07-04 08:44 -------
Index: gcc/fortran/io.c
===================================================================
--- gcc/fortran/io.c (Revision 137451)
+++ gcc/fortran/io.c (Arbeitskopie)
@@ -694,9 +694,15 @@ data_desc:
error = zero_width;
goto syntax;
}
- else
- return gfc_notify_std (GFC_STD_F2008, "Fortran F2008: 'G0' in "
- "format at %C");
+ u = format_lex ();
+ if (u == FMT_ERROR)
+ goto fail;
+ if (u == FMT_PERIOD)
+ gfc_error_now ("For G0 specifying d (G0.d) is not allowed at %C");
+
+ saved_token = u;
+ return gfc_notify_std (GFC_STD_F2008, "Fortran F2008: 'G0' in "
+ "format at %C");
}
if (u == FMT_ERROR)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36725