diff options
author | Asher Langton <langton2@llnl.gov> | 2005-10-24 14:50:18 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2005-10-24 14:50:18 +0000 |
commit | 09e87839d4255f7a9fd1c2531efacd7b8b6f33a8 (patch) | |
tree | a9bd12371703f8d2b1cef1390ea3e56d4e2cff82 /gcc/fortran/decl.c | |
parent | aca2b8da2026c46d5ed9447823111a488d364135 (diff) | |
download | gcc-09e87839d4255f7a9fd1c2531efacd7b8b6f33a8.zip gcc-09e87839d4255f7a9fd1c2531efacd7b8b6f33a8.tar.gz gcc-09e87839d4255f7a9fd1c2531efacd7b8b6f33a8.tar.bz2 |
Commit for Asher Langton <langton2@llnl.gov>
fortran/
* decl.c (gfc_match_save): Changed duplicate SAVE errors to
warnings in the absence of strict standard conformance
* symbol.c (gfc_add_save): Same.
testsuite/
* gfortran.dg/dup_save_1.f90: New test.
* gfortran.dg/dup_save_2.f90: New test.
From-SVN: r105850
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 69c0fc8..2ecd143 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -3271,10 +3271,11 @@ gfc_match_save (void) { if (gfc_current_ns->seen_save) { - gfc_error ("Blanket SAVE statement at %C follows previous " - "SAVE statement"); - - return MATCH_ERROR; + if (gfc_notify_std (GFC_STD_LEGACY, + "Blanket SAVE statement at %C follows previous " + "SAVE statement") + == FAILURE) + return MATCH_ERROR; } gfc_current_ns->save_all = gfc_current_ns->seen_save = 1; @@ -3283,8 +3284,10 @@ gfc_match_save (void) if (gfc_current_ns->save_all) { - gfc_error ("SAVE statement at %C follows blanket SAVE statement"); - return MATCH_ERROR; + if (gfc_notify_std (GFC_STD_LEGACY, + "SAVE statement at %C follows blanket SAVE statement") + == FAILURE) + return MATCH_ERROR; } gfc_match (" ::"); |