This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32985] New: Derived type variables need SEQUENCE attribute to be in a COMMON
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Aug 2007 13:05:34 -0000
- Subject: [Bug fortran/32985] New: Derived type variables need SEQUENCE attribute to be in a COMMON
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
"C589 (R558) If a common-block-object is of a derived type, it shall be a
sequence type (4.5.1) or a type with the BIND attribute and it shall have no
default initialization."
A default initializer is also accepted.
Testcase based on the invalid gfortran.dg/namelist_14.f90:
!{ dg-do compile }
module global
type :: mt
integer :: ii(4)
end type mt
end module global
program namelist_14
use global
common /myc/ cdt
type(mt) :: cdt
end program namelist_14
! { dg-final { cleanup-modules "global" } }
--
Summary: Derived type variables need SEQUENCE attribute to be in
a COMMON
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32985