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

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 27 10:26:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52393

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-02-27
            Summary|Erroneous parse of read     |I/O: "READ format"
                   |statement with              |statement with parenthesed
                   |parenthesised expression in |default-char-expr
                   |format                      |
     Ever Confirmed|0                           |1

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-27 10:11:47 UTC ---
OK, that's what you want to achieve. That code definitely breaks with all my
compilers, but it seems to be valid.

In gcc/fortran/io.c's match_io, one has:

  m = gfc_match_char ('(');
  if (m == MATCH_NO)
   {
     // Handle "READ /format/" (and PRINT)
   }
  else
   {
     // Handle READ/WRITE with io-list
   }

Which does not work if the format expression starts with a '('.



More information about the Gcc-bugs mailing list