------- Comment #4 from burnus at gcc dot gnu dot org  2010-07-13 12:04 -------
Thus: The derived type needs to be BIND(C) - but then it cannot be extended (as
it is not extensible) - nor can the extended type be BIND(C) (per C1503). And
without BIND(C) it is not interoperable - besides that polymorphic types are
ruled out explicitly.

F2008 FDIS:

"4.5.7.1 Concepts
A derived type that does not have the BIND attribute or the SEQUENCE attribute
is an extensible type."

"15.2.3.6 C_LOC (X)
[...] X shall have either the POINTER or TARGET attribute. It shall not be a
coindexed object. It shall either be a variable with interoperable type and
kind type parameters, or be a scalar, nonpolymorphic variable with no length
type parameters. [...]"

"15.3.4 Interoperability of derived types and C struct types
A Fortran derived type is interoperable if it has the BIND attribute.
C1501 (R425) A derived type with the BIND attribute shall not have the SEQUENCE
attribute.
C1502 (R425) A derived type with the BIND attribute shall not have type
parameters.
C1503 (R425) A derived type with the BIND attribute shall not have the EXTENDS
attribute.
C1504 (R425) A derived type with the BIND attribute shall not have a
type-bound-procedure-part.
C1505 (R425) Each component of a derived type with the BIND attribute shall be
a nonpointer, nonallocatable data component with interoperable type and type
parameters."


-- 


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

Reply via email to