From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17281 invoked by alias); 6 Jan 2015 05:59:14 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 17255 invoked by uid 48); 6 Jan 2015 05:59:08 -0000 From: "thfanning at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/64506] New: FORMAT Parse Error with Continuation Line Date: Tue, 06 Jan 2015 05:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thfanning at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg00281.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64506 Bug ID: 64506 Summary: FORMAT Parse Error with Continuation Line Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: thfanning at gmail dot com Created attachment 34385 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34385&action=edit Sample program to illustrate parse error. In a FORMAT statement, a character literal immediately followed by a continuation character (&) and then a comment character (!) results in a parse error. A simple program is attached that implements the following statements: 100 format('This format is OK.'& ) 200 format('This format fails.'&!comment ) 300 format('This format fails.'& !comment ) 400 format('This format is OK.' &!comment ) 500 format('This format is OK.' & !comment ) Compiling this results in the following: 200 format('This format fails.'&!comment 1 Error: Unexpected element '&' in format string at (1) gfortran_parse_error.f90:13.32: 300 format('This format fails.'& !comment 1 Error: Unexpected element '&' in format string at (1)