To: J3 08-143r2 From: Jim Xia/Bill Long Subject: Comment: to disallow coindexed object as a data-ref in procedure-designator Date: 2008 May 12 References: J3/08-007r2 (WG5/N1723) Discussion: The 2008 standard explicitly declares that a coindexed object can be used as the in a or in a . In particular, Note 12.16 on page 286 provides the following interpretation for the case "If image I executes a procedure reference in which the variable of a proc-component-ref specifies a procedure pointer on image J, the procedure pointer association is fetched from image J but the invocation of the associated procedure occurs on image I." This capability was included because it is irregular that one can read data pointers on other images but not procedure pointers. This was particularly argued for the case when a polymorphic object has different dynamic types on different images---there is no way for an image to call the right type-bound procedure for the objects on other images. While simple to implement on a homogenous system if the same static executable is running for each image, this capability is more difficult to implement on a heterogenous system, and execution of such procedure references would likely result in poor performance. It is also possible that users might be confused by the notation and assume that the procedure is executing on the remote image. The only real use of this is when there is a PASSed dummy argument, or the object is polymorphic. The first case is only syntactic sugar. For either case the notation call x[j]%proc() is a short hand for call target_of_proc_on_image_j (x[j] ) which likely results in a copy-in/copy-out situation for the argument. This is not what users would want or exepct and is likely to be inefficient on most cases. Overall, we feel the negatives outweigh the benefits, and this capability should be removed. EDITS to 08-007r2 (WG5 N1723): [157:7.2.2.2] Near the end of "Pointer assignment/Syntax" add a new constraint: "C728a (R741) The shall not be coindexed object." [285:12.5.1p1] In "Procedure reference/Syntax" add a new constraint: "C1230a (R1221) shall not be a coindexed object." [286:12.5.1p3+] Delete Note 12.16.