To: J3 11-124 From: John Reid Subject: Interop: On assumed type Date: 2011 January 26 References: N1838, N1844 DISCUSSION It is anticipated that compilers will provide only an address for an explicit-shape or assumed-size dummy array. It follows that if the type is assumed, the element length will be unknown and there is no way to construct a descriptor when the array is used as an actual argument corresponding to a dummy argument that expects one. Here is an example provided by Aleks Donev: interface subroutine sub_c(x) bind(c) type(*),dimension(:) :: x end subroutine end interface subroutine sub(x) type(*),dimension(*) :: x call sub_c(x(1:10)) ! Should not be allowed end subroutine An edit is provided to disallow this. In N1844, subsection on Page 9, Aleks Donev asks for the rules that explain how the type field in the descriptor gets filled when the actual is polymorphic to be made explicit. An edit is provided. EDITS to N1838: [3:17+] In 2.1 Assumed-type objects, after para 3, insert C407x2 An explicit-shape or assumed-size dummy array of assumed type or a subobject of such an array shall not appear as an actual argument that corresponds to an assumed-shape or assumed-rank dummy argument. [12:10] In 5.2.5 Macros, at the end of para 7 add In a C descriptor for an object of a type that is not interoperable, the attribute member shall have the value CFI_type_unspecified. In a C descriptor for a polymorphic object, the attribute member shall specify the dynamic type if it is known and is interoperable and shall otherwise have the value CFI_type_unspecified.