To: J3 09-198r1 From: Bill Long and John Reid Subject: Pointer components and coindexed arguments Date: 2009 April 20 References: 09-007r1, 08-216r2, 08-282, 08-307 Discussion This is a mechanical revision of 09-120, which 'fell through the cracks' at the February meeting. The changes relate only to the replacement of 09-007 by 09-007r1 and the addition of Bill Long as co-author. 08-120 was a revision 08-216r2 following the comments in 08-282 and J3 discussion of 08-307, with references updated to 09-007. Bill and I were co-authors of the original paper 08-216. It is made clear (161: 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 09-007r1: [161: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". [161: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." [294:19] In 12.5.2.3 "Argument association", para 5, after "pointer actual argument" add "that is not a subobject of a coindexed object". [294:21+] 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 pointer association status of the corresponding subobject of the dummy argument becomes undefined on entry to the procedure. If the pointer association status of the subobject of the dummy argument becomes defined or undefined during execution of the procedure, the pointer association status of the subobject of the actual argument becomes undefined." [450:2] In 16.5.2.1 "Pointer association / General", para 1, line 2, after "different targets" add "on its own image". [452:28-30+] 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) a procedure is invoked with the pointer as a data pointer subobject of an actual argument that is a coindexed object and the pointer association status of the corresponding subobject of the dummy argument becomes defined or undefined during execution of the procedure."