This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52393] I/O: "READ format" statement with parenthesed default-char-expr
- From: "jvdelisle at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 24 May 2016 15:04:29 +0000
- Subject: [Bug fortran/52393] I/O: "READ format" statement with parenthesed default-char-expr
- Auto-submitted: auto-generated
- References: <bug-52393-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52393
--- Comment #9 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
The following patch allows the program to compile. I just need to check the
standard to confirm if the syntax in question also applies to WRITE.
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index da0e1c5e..296beef4 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -3751,7 +3751,7 @@ match_io (io_kind k)
{
/* Before issuing an error for a malformed 'print (1,*)' type of
error, check for a default-char-expr of the form ('(I0)'). */
- if (k == M_PRINT && m == MATCH_YES)
+ if (m == MATCH_YES)
{
/* Reset current locus to get the initial '(' in an expression. */
gfc_current_locus = where;