[Bug fortran/32985] COMMON checking: TYPE with(out) SEQUENCE/bind(C), ALLOCATABLE
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Aug 4 13:17:00 GMT 2007
------- Comment #1 from burnus at gcc dot gnu dot org 2007-08-04 13:17 -------
Interestingly, the following gives an error:
type a
integer :: i
end type a
type(a) :: t
common /c/ t
end
Related, the following is accepted but invalid (for different reasons):
"C588 (R558) A common-block-object shall not be a dummy argument, an
allocatable variable, a derived-type object with an ultimate component that is
allocatable, an automatic object, a function name, an entry name, a variable
with the BIND attribute, or a result name."
type a
sequence
integer,allocatable :: i(:)
end type a
type(a) :: t
common /c/ t
end
NAG f95 writes:
T has an allocatable component - cannot occur in COMMON
ifort:
Error: Variables containing ultimate allocatable array components cannot appear
in COMMON or EQUIVALENCE statements. [T]
openf95/sunf95:
"T" is of a derived type that has an ultimate component that is allocatable,
therefore it must not be a named constant or a variable in common.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Summary|Derived type variables need |COMMON checking: TYPE
|SEQUENCE attribute to be in |with(out) SEQUENCE/bind(C),
|a COMMON |ALLOCATABLE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32985
More information about the Gcc-bugs
mailing list