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 | |
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')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/decl.c | 15 | ||||
-rw-r--r-- | gcc/fortran/symbol.c | 7 |
3 files changed, 20 insertions, 8 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 5cb021b..a019a1b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2005-10-24 Asher Langton <langton2@llnl.gov> + + * decl.c (gfc_match_save): Changed duplicate SAVE errors to + warnings in the absence of strict standard conformance + * symbol.c (gfc_add_save): Same. + 2005-10-24 Francois-Xavier Coudert <coudert@clipper.ens.fr> PR fortran/15586 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 (" ::"); diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 98ce66f..c1221eb 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -681,8 +681,11 @@ gfc_add_save (symbol_attribute * attr, const char *name, locus * where) if (attr->save) { - duplicate_attr ("SAVE", where); - return FAILURE; + if (gfc_notify_std (GFC_STD_LEGACY, + "Duplicate SAVE attribute specified at %L", + where) + == FAILURE) + return FAILURE; } attr->save = 1; |