This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/44371] [4.6 Regression] STOP parsing rejects valid code
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jun 2010 00:42:12 -0000
- Subject: [Bug fortran/44371] [4.6 Regression] STOP parsing rejects valid code
- References: <bug-44371-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from kargl at gcc dot gnu dot org 2010-06-02 00:42 -------
The problem is caused by gfc_match_stopcode().
if (gfc_match_eos () != MATCH_YES)
{
m = gfc_match_init_expr (&e);
if (m == MATCH_ERROR)
goto cleanup;
if (m == MATCH_NO)
goto syntax;
}
#if 0
if (gfc_match_eos () != MATCH_YES)
goto syntax;
#endif
If the first gfc_match_eos () does not match an end-of-statement,
gfortran immediate calls gfc_match_eos () again. With the #if 0
above the code in comment #1 compiles and executes. So, why is
there a 2nd call to gfc_match_eos().
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sgk at troutmask dot apl dot
| |washington dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44371