Commit d1f6dfe6 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/53597 (F95/F2003 constraint no longer triggers: un-SAVED…

re PR fortran/53597 (F95/F2003 constraint no longer triggers: un-SAVED default-initialized module variable)

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-13  Tobias Burnus  <burnus@net-b.de>

        PR fortran/53597
        * gfortran.dg/save_4.f90: New.

From-SVN: r188506
parent 9c78662a
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
......
......@@ -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;
......
2012-06-13 Tobias Burnus <burnus@net-b.de>
PR fortran/53597
* gfortran.dg/save_4.f90: New.
2012-06-12 Jakub Jelinek <jakub@redhat.com>
PR c/53532
......
! { dg-do compile }
! { dg-options "-std=f2003" }
!
! PR fortran/53597
!
MODULE somemodule
IMPLICIT NONE
TYPE sometype
INTEGER :: i
DOUBLE PRECISION, POINTER, DIMENSION(:,:) :: coef => NULL()
END TYPE sometype
TYPE(sometype) :: somevariable ! { dg-error "Fortran 2008: Implied SAVE for module variable 'somevariable' at .1., needed due to the default initialization" }
END MODULE somemodule
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment