diff options
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/match.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index a02bebd..3b3584c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2006-06-23 Steven G. Kargl <kargls@comcast.net> + + PR fortran/27981 + * match.c (gfc_match_if): Handle errors in assignment in simple if. + 2006-06-22 Asher Langton <langton2@llnl.gov> PR fortran/24748 diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 448d927..0ad5e13 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -1061,6 +1061,12 @@ gfc_match_if (gfc_statement * if_type) gfc_undo_symbols (); gfc_current_locus = old_loc; + /* m can be MATCH_NO or MATCH_ERROR, here. For MATCH_NO, continue to + call the various matchers. For MATCH_ERROR, a mangled assignment + was found. */ + if (m == MATCH_ERROR) + return MATCH_ERROR; + gfc_match (" if ( %e ) ", &expr); /* Guaranteed to match */ m = gfc_match_pointer_assignment (); |