diff options
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index ccd1071..919d5d1 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -1705,6 +1705,30 @@ gfc_free_iterator (gfc_iterator *iter, int flag) } +/* Match a BLOCK statement. */ + +match +gfc_match_block (void) +{ + match m; + + if (gfc_match_label () == MATCH_ERROR) + return MATCH_ERROR; + + if (gfc_match (" block") != MATCH_YES) + return MATCH_NO; + + /* For this to be a correct BLOCK statement, the line must end now. */ + m = gfc_match_eos (); + if (m == MATCH_ERROR) + return MATCH_ERROR; + if (m == MATCH_NO) + return MATCH_NO; + + return MATCH_YES; +} + + /* Match a DO statement. */ match |