This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/52393] I/O: "READ format" statement with parenthesed default-char-expr


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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]