This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30660] New: Allocatable components of a derived type "require" the SAVE attribute.
- From: "toon at moene dot indiv dot nluug dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jan 2007 21:34:20 -0000
- Subject: [Bug fortran/30660] New: Allocatable components of a derived type "require" the SAVE attribute.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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