J3/14-223 To: J3 From: Nick Maclaren Subject: TARGET and coindexed arguments Date: 2014 August 07 ---------------------------------------------------------------------- NUMBER: TBD TITLE: TARGET and coindexed arguments KEYWORD: TARGET, coindexing DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Is the following program conforming and required to print 10, 10, 10 and 123, 123, 123? PROGRAM Main INTEGER, TARGET :: coarray(3)[*] coarray = 10*THIS_IMAGE() IF (THIS_IMAGE() == 1) THEN SYNC ALL coarray = 123 SYNC ALL ELSE IF (THIS_IMAGE() == 2) THEN CALL Fred(coarray(:)[1]) ELSE SYNC ALL SYNC ALL END IF CONTAINS SUBROUTINE Fred (arg) INTEGER, TARGET :: arg(:) PRINT *, arg SYNC ALL SYNC ALL PRINT *, arg END SUBROUTINE Fred END PROGRAM Main DISCUSSION: 12.5.2.13p1(3)(b) and (4)(b) do not exclude this case, but it is hard to see how it could be implemented without severe impact on ordinary code. ANSWER: The program is not intended to be conforming. Edits are provided to correct this oversight. EDITS: [300] 12.5.2.13p1(3)(b) append to the end of the paragraph "or a coindexed object". [300] 12.5.2.13p1(4)(b) append to the end of the paragraph "or a coindexed object". SUBMITTED BY: Nick Maclaren HISTORY: m205 14-nnn Submitted