To: J3 08-162r2 From: Jim Xia/Bill Long Subject: Comment: allocatable coarray and non-coarray allocatable dummy Date: 2008 May 13 References: J3/08-007r2 (WG5/N1723) DISCUSSION: It seems that N1723 allows an allocatable coarray to be associated with a non-coarray allocatable dummy. Consider the following sample program real, allocatable :: x(:)[:] call sub (x) !<-- this should be disallowed ... subroutine sub (y) real, allocatable :: y(:) ... end subroutine Since subroutine sub expects a non-coarray allocatable dummy, it could allocate or deallocate the dummy argument. However, the corresponding actual argument is a coarray; allocation or deallocation of it involves implicit synchronization. This call should not be allowed. EDITS to J3/08-007r2: [292:12.5.2.6p2+] After the second paragraph of 12.5.2.6 "Allocatable dummy variables", insert a new paragraph: "The corank of the actual argument shall be the same as that of the dummy argument." [292:12.5.2.8] Replace the title of 12.5.2.8 "Coarray arguments" with "Coarray dummy variables". [292:12.5.2.8p1] Delete the second sentence of 12.5.2.8 which reads "If the dummy argument is an allocatable coarray, ... same rank and corank."