To: J3 08-158 From: Bill Long and John Reid Subject: Allocatable coarrays with intent(out) Date: 2008 April 25 References: J3/08-007r2 (WG5/N1723) Discussion: Jim Xia has pointed out a problem with an intent(out) dummy argument that is an allocatable coarray or has an allocatable coarray component. 6.6.3.2, para. 6 makes it clear that such a coarray is deallocated when the procedure is invoked. This means that there is an implicit synchronization of all images, but text of the rest of the draft standard does not allow for this possibility. We propose that intent(out) be disallowed for such dummy arguments and provide edits. The option of specifying intent(inout), or no intent, is a simple alternative for the user. Indeed, this is already suggested in Note 5.16 for cases where intent(out) is not allowed. An alternative would be to specify that these deallocations do not occur for coarrays, but this is irregular. We could add CALL for a subroutine with such an argument to the list of image control statements in 8.5.1, but this would not allow for the function case. Edits to J3/08-007r2 (WG5/N1723): [95:p2-] At the end of the first paragraph of 5.3.10 INTENT attribute add: C541a An entity with the INTENT(OUT) attribute shall not be an allocatable coarray or have a subobject that is an allocatable coarray. [95:p4+] Add this sentence to the end of Note 5.13: "To avoid this deallocation for coarrays, INTENT(OUT) is not allowed for a dummy argument that is an allocatable coarray or has a subobject that is an allocatable coarray."