diff options
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/decl.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 02b644544a6..ffe1254a193 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2012-06-13 Tobias Burnus <burnus@net-b.de> + + PR fortran/53597 + * decl.c (match_attr_spec): Only mark module variables + as SAVE_IMPLICIT for Fortran 2008 and later. + 2012-06-08 Janus Weil <janus@gcc.gnu.org> PR fortran/52552 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index a760331eeba..26b5059cd9f 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -3810,8 +3810,9 @@ match_attr_spec (void) } } - /* Module variables implicitly have the SAVE attribute. */ - if (gfc_current_state () == COMP_MODULE && !current_attr.save) + /* Since Fortran 2008 module variables implicitly have the SAVE attribute. */ + if (gfc_current_state () == COMP_MODULE && !current_attr.save + && (gfc_option.allow_std & GFC_STD_F2008) != 0) current_attr.save = SAVE_IMPLICIT; colon_seen = 1; |