To: J3 J3/21-199 From: John Reid Subject: US 12, arrays of coarrays, MOLD= in ALLOCATE Date: 2021-October-22 Reference: 21-007r2 Discussion ---------- If a non-coarray of unlimited-polymorphic type were allowed to be allocated to have a dynamic type with a coarray ultimate component its deallocation would be an image control statement. It was intended to disallow this because it is undesirable to have a data value determine whether a statement is an image control statement. For the ALLOCATE statement, the constraint C953 (R932) The declared type of shall not have a coarray ultimate component. applies both to MOLD= and SOURCE= and ensures that an unlimited- polymorphic is not given a dynamic type with a coarray ultimate component in this way but there is no comparable constraint for . Such a constraint is not needed for a polymorphic with a declared type that has a coarray ultimate component and the constraint on MOLD= is not needed in this case either. I propose moving the SOURCE= part of C953 to C952, deleting the MOLD= part of C953 and adding this restriction: "If an is unlimited polymorphic, the dynamic type of neither nor shall have a coarray ultimate component." It is a runtime restriction so it cannot be a constraint but can be normative. Edits to 21-007r2 ----------------- [142:27,30] In 9.7.1.1 Form of the ALLOCATE statement, in C952 after "not" add "have a coarray ultimate component," so that the constraint becomes "C952 (R929) If SOURCE= appears, the declared type of shall not have a coarray ultimate component, be EVENT_TYPE, LOCK_TYPE, or NOTIFY_TYPE from the intrinsic module ISO_FORTRAN_ENV, or have a potential subobject component of type EVENT_TYPE, LOCK_TYPE or NOTIFY_TYPE." Delete "C953 (R932) The declared type of shall not have a coarray ultimate component." [143:12] In 9.7.1.1 Form of the ALLOCATE statement, at the end of para 5 add "If an is unlimited polymorphic, the dynamic type of neither nor shall have a coarray ultimate component."