public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32985]  New: Derived type variables need SEQUENCE attribute to be in a COMMON
@ 2007-08-04 13:05 burnus at gcc dot gnu dot org
  2007-08-04 13:17 ` [Bug fortran/32985] COMMON checking: TYPE with(out) SEQUENCE/bind(C), ALLOCATABLE burnus at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-08-04 13:05 UTC (permalink / raw)
  To: gcc-bugs

"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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-08-26 18:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-04 13:05 [Bug fortran/32985] New: Derived type variables need SEQUENCE attribute to be in a COMMON burnus at gcc dot gnu dot org
2007-08-04 13:17 ` [Bug fortran/32985] COMMON checking: TYPE with(out) SEQUENCE/bind(C), ALLOCATABLE burnus at gcc dot gnu dot org
2007-08-04 13:18 ` burnus at gcc dot gnu dot org
2007-08-06 19:23 ` burnus at gcc dot gnu dot org
2007-08-06 20:18 ` burnus at gcc dot gnu dot org
2007-08-08 15:09 ` fxcoudert at gcc dot gnu dot org
2007-08-20 19:10 ` patchapp at dberlin dot org
2007-08-26 18:30 ` burnus at gcc dot gnu dot org
2007-08-26 18:34 ` burnus at gcc dot gnu dot org
2007-08-26 18:39 ` burnus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).