J3/14-229 To: J3 From: Nick Maclaren Subject: Conformability and allocated components Date: 2014 August 13 ---------------------------------------------------------------------- NUMBER: TBD TITLE: Conformability and allocated components KEYWORD: Conformable, allocatable DEFECT TYPE: Clarification STATUS: J3 consideration in progress QUESTION 1: Are the objects one and two conformable after the allocation? PROGRAM Main TYPE :: Mytype INTEGER, ALLOCATABLE :: data(:) END TYPE Mytype TYPE(Mytype) :: one, two ALLOCATE(one%data(3),two%data(5)) ! Are one and two conformable? END PROGRAM Main QUESTION 2: Are the objects one and two conformable after the allocation? PROGRAM Main TYPE :: Mytype INTEGER, POINTER :: data(:) END TYPE Mytype TYPE(Mytype) :: one, two ALLOCATE(one%data(3),two%data(5)) ! Are one and two conformable? END PROGRAM Main DISCUSSION: There appears to be no precise definition of conformable. 1.3.35 says that conformable is having the same shape, .... Unfortunately, that could be read either way for the above examples. 7.2.1.2p1(3) says "the variable and expr shall be conformable unless the variable is an allocatable array that has the same rank as expr and is neither a coarray nor a coindexed object". 7.2.1.3p13 describes assignment of derived types, essentially to be recursive. This would seem to mean that they are not conformable in the first example, but are in the second, but there is room for doubt. A precise definition of conformable is needed. ANSWER: Awaiting statement of direction. EDITS: Awaiting statement of direction. SUBMITTED BY: Nick Maclaren HISTORY: m205 14-nnn Submitted