[Bug fortran/44371] New: [4.6 Regression] STOP parsing rejects valid code

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Jun 1 21:29:00 GMT 2010


Found at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/b2e1f15014d76daf

There, Al Greynolds reports that the following program fails to compile with:

  if (c=='y') stop; if (c=='Y') stop
                   1
Error: Syntax error in STOP statement at (1)


I assume it is due to the new expression parsing for (ALL) STOP, which gets
confused if no expression is matched because of a semicolon rather than because
of EOL.


  character(1) c
  read(*,*) c
  if (c=='y') stop; if (c=='Y') stop
  end


-- 
           Summary: [4.6 Regression] STOP parsing rejects valid code
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list