To: J3 08-307 From: John Reid Subject: Pointer components and coindexed arguments Date: 2008 Nov 17 References: J3/08-007r2 (WG5/N1723), 08-216r2, 08-282 Discussion This is a revision of 08-216r2 following the comments in 08-282. It is made clear (157: 7.2.2.3, para 2) that for data pointer assignment, if the is a pointer with a target that is not on the same image, the pointer association status of the becomes undefined. Note 7.46 explains that this is intended to cover situations where data pointer association with a target that is not on the same image might otherwise be implied. While the intention is clear, the normative text does not cover situations that are not defined in terms of pointer assignment, notably when a coindexed actual argument has a pointer component. To cover all situations, we think that it should be made clear in 16.5.2 that a data pointer can be associated only with a target that is on the same image. We also propose to add to 16.5.2.5 the case of a pointer component of a coindexed actual argument to the list of ways that the association status of a pointer may become undefined. We also propose to expand Note 7.46. Edits to J3/08-007r2 (WG5/N1723): [157:Note 7.46] In 7.2.2.3 "Data pointer assignment", in the Note following para 2, second sentence, replace "This prevents this statement" with "This prevents a pointer assignment statement from". [157:Note 7.46] In 7.2.2.3 "Data pointer assignment", in the Note following para 2, third sentence, delete the middle clause ", such as ... intrinsic assignment". Then add a new final sentence, "Examples include a pointer component in a derived-type intrinsic assignment or a pointer component of an allocate object in an ALLOCATE statement if SOURCE= appears and the source expression is coindexed." [288] In 12.5.2.3 "Argument association", para 5, after "pointer actual argument" add "that is not a subobject of a coindexed object". [288] In 12.5.2.3 "Argument association", after para 5 add a new para: "If the actual argument is a coindexed object having a pointer subobject, the corresponding subobject of the dummy argument is not associated with the target of the actual argument subobject. On entry to the procedure, the pointer association status of the subobject of the dummy argument becomes undefined; on return from the procedure, the pointer association status of the subobject of the actual argument becomes undefined unless the dummy argument has INTENT(IN)" [446] In 16.5.2.1 "Pointer association / General", para 1, line 2, after "different targets" add "on its own image". [448] In 16.5.2.5 "Events that cause the association status of pointers to become undefined" remove "or" at the end of item (11), change the final period at the end of (12) to a comma, and add to the list: "(13) a procedure is invoked with the pointer as a data pointer subobject of a dummy argument that corresponds to an actual argument that is a coindexed object, or (14) return takes place from a procedure with the pointer as a data pointer subobject of an actual argument that is a coindexed object corresponding to a dummy argument that is not of INTENT(IN)."