------- Comment #5 from jvdelisle at gcc dot gnu dot org 2010-06-02 04:17 ------- Some additional tests/results:
Because we are using gfc_match_init_expr: leaving the ; out. pr44371.f90:5.18: if (c=='y') stop if (c=='Y') stop 1 Error: Function 'if' in initialization expression at (1) must be an intrinsic function This makes no sense in the context, so I want to change the above error message. The following message is given after I fix the eos match issue: if (c=='y') stop 123 if (c=='Y') stop 1 Error: Syntax error in STOP statement at (1) Simply deleting the match_eos leaves the invalid undetected. I plan to commit the following as simple and obvious. Sorry for the breakage. Index: match.c =================================================================== --- match.c (revision 160130) +++ match.c (working copy) @@ -2018,10 +2018,11 @@ goto cleanup; if (m == MATCH_NO) goto syntax; + + if (gfc_match_eos () != MATCH_YES) + goto syntax; } - if (gfc_match_eos () != MATCH_YES) - goto syntax; if (gfc_pure (NULL)) { -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44371