diff options
author | Fritz Reese <fritzoreese@gmail.com> | 2016-10-25 15:24:36 +0000 |
---|---|---|
committer | Fritz Reese <foreese@gcc.gnu.org> | 2016-10-25 15:24:36 +0000 |
commit | 90051c26da7abd0999ce0afdd9471e354009b861 (patch) | |
tree | e01b0eb63f28905e753fbf1c8cd6160907cdfc2b /gcc/fortran/parse.c | |
parent | ef14476730875df063a5788a0072984e22b7c2ec (diff) | |
download | gcc-90051c26da7abd0999ce0afdd9471e354009b861.zip gcc-90051c26da7abd0999ce0afdd9471e354009b861.tar.gz gcc-90051c26da7abd0999ce0afdd9471e354009b861.tar.bz2 |
Support TYPE as alias for PRINT with -fdec.
gcc/fortran/
* decl.c (gfc_match_type): New function.
* match.h (gfc_match_type): New function.
* match.c (gfc_match_if): Special case for one-line IFs.
* gfortran.texi: Update documentation.
* parse.c (decode_statement): Invoke gfc_match_type.
gcc/testsuite/gfortran.dg/
* dec_type_print.f90: New testcase.
From-SVN: r241518
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 0323435..760d3af 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -413,6 +413,12 @@ decode_statement (void) gfc_undo_symbols (); gfc_current_locus = old_locus; + /* Try to match TYPE as an alias for PRINT. */ + if (gfc_match_type (&st) == MATCH_YES) + return st; + gfc_undo_symbols (); + gfc_current_locus = old_locus; + match (NULL, gfc_match_do, ST_DO); match (NULL, gfc_match_block, ST_BLOCK); match (NULL, gfc_match_associate, ST_ASSOCIATE); |