The following program is valid and compiles with GCC 4.2.x. However, using
today's 4.3.0 it is rejected with the message:
    REAL, save :: c(0:(lmaxd+1)*(lmaxd+1))
                                         1
Error: automatic object 'c' at (1) cannot have the SAVE attribute

Obviously, 'C' is not an automatic object but has constant bounds and can thus
have the SAVE attribute.

  subroutine grylmr()
    integer, parameter :: lmaxd = 20
    REAL, save :: c(0:(lmaxd+1)*(lmaxd+1))
  end subroutine grylmr
end


-- 
           Summary: [Regression 4.3] Array with constant bound rejected as
                    automatic array
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org
OtherBugsDependingO 32834
             nThis:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33689

Reply via email to