07-213r1 To: J3 From: Van Snyder/Stan Whitlock Subject: Interoperability of non-BIND derived types Date: 9-May-2007 NUMBER: F03/0089 TITLE: Interoperability of non-BIND derived types KEYWORDS: Interoperability, derived type DEFECT TYPE: Erratum STATUS: J3 consideration in progress INTRODUCTION Subclause 15.3.4 of 04-007 says "A Fortran type is interoperable with a C struct type if the derived-type definition of the Fortran type specified BIND(C) (4.5.2), the Fortran derived type and the C struct type have the same number of components, and the components of the Fortran derived type have types and type parameters that are interoperable with the types of the corresponding components of the struct type. QUESTIONS Is a Fortran derived type for which BIND(C) is not specified interoperable with any C struct type? Does a Fortran derived type interoperate with a C struct type that has a different number of components? Does a Fortran derived type interoperate with a C struct type that specifies the same components in a different order? Does a Fortran derived type with a pointer or allocatable component that has interoperable type and type parameters interoperate with any C struct type? ANSWERS: None of these Fortran derived types are interoperable. EDITS: Replace "if" in the above quoted paragraph in subclause 15.3.4 by "if and only if". SUBMITTED BY: Van Snyder HISTORY: m180 Submitted HISTORY: 07-213 m180 F03/0089 Submitted 07-213r1 m180