J3/15-249r1 To: J3 Members From: Van Snyder Subject: Interp: PURE, structure constructor with pointer subobject Date: 2015 October 16 ---------------------------------------------------------------------- NUMBER: F08/0148 TITLE: Pointer subobject in structure constructor in pure procedure KEYWORDS: pointer subobject, structure constructor, pure procedure DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Consider the module program P type :: T1 integer, pointer :: P1 end type T1 type :: T2 type(t1) :: P2 end type T2 type(t1), target :: V1 allocate ( V1%p1, source = 42 ) contains pure subroutine S ( ) type(t2) :: A 1 a = t2(v1) a%p2%p1 = a%p2%p1 + 1 end subroutine S end program P Item (3) in the list in constraint C1283 in subclause 12.7 prohibits an object that is accessed by host or use association (and other categories) to be the in a structure constructor that corresponds to a component that has the POINTER attribute. It is silent concerning type constructors for types that have potential subobject components with the POINTER attribute. Is the statement labeled 1 permitted? If so, was that intended? ANSWER: The statement labeled 1 was inadvertently allowed because V1 corresponds to a component of the structure constructor for type T2 that does not have the POINTER attribute. An edit is provided to correct this mistake. EDIT: [312:35 12.7p2 C1283(3)] After "component" insert ", or that has a pointer component at any level of component selection,". SUBMITTED BY: Van Snyder HISTORY: 15-249 m208 F08/0148 submitted 15-249r1 m208 fix trypos - passed J3 meeting ----------------------------------------------------------------------