This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/30660] New: Allocatable components of a derived type "require" the SAVE attribute.


The attached code draws the following, bogus, error message from the compiler:

$ /usr/snp/bin/gfortran -c globals.f90
globals.f90:37.24:

  TYPE(weight_t) g_winfo ! weights info
                       1
Error: Object 'g_winfo' at (1) must have the SAVE attribute for default
initialization of a component
globals.f90:36.21:

  TYPE(grib_t) g_dest  ! output field
                    1
Error: Object 'g_dest' at (1) must have the SAVE attribute for default
initialization of a component

It's related to the allocatable components of said types.


-- 
           Summary: Allocatable components of a derived type "require" the
                    SAVE attribute.
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: toon at moene dot indiv dot nluug dot nl


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]