Visible to Intel only — GUID: GUID-32AF28B0-45A1-4678-A1E9-71AD7B0BAB94
Visible to Intel only — GUID: GUID-32AF28B0-45A1-4678-A1E9-71AD7B0BAB94
Coarray Dummy Arguments
If a dummy argument is a coarray, the corresponding actual argument must be a coarray and must have the VOLATILE attribute if and only if the dummy argument has the VOLATILE attribute.
If a dummy argument is an array coarray that has the CONTIGUOUS attribute, is an array that has the CONTIGUOUS attribute and has a coarray ultimate component, or is neither an assumed-rank array or an assumed-shape array, the corresponding actual argument must be simply contiguous or an element of a simply contiguous array.
Examples
When a procedure is invoked on a particular image, each dummy coarray is associated with its ultimate argument on the image. During the execution of the procedure, this image can access the coarray corresponding to the ultimate argument on any other image. For example, consider the following:
INTERFACE
SUBROUTINE MY_SUB(Y)
REAL :: Y[*]
END SUBROUTINE MY_SUB
END INTERFACE
...
REAL :: B(700)[:]
...
CALL MY_SUB(B(10))
When subroutine MY_SUB is invoked, the executing image has access through the syntax Y[P] to B(10) on image P.
Each invocation of a procedure with a nonallocatable coarray dummy argument establishes a dummy coarray for the image with its own bounds and cobounds. During the execution of the procedure, this image may use its own bounds and cobounds to access the coarray corresponding to the ultimate argument on any other image. For example, consider the following:
INTERFACE
SUBROUTINE MY_SUB(Y,I)
INTEGER :: I
REAL :: Y(I,I)[I,*]
END SUBROUTINE MY_SUB
END INTERFACE
...
REAL :: B(1000)[:]
...
CALL MY_SUB(B,10)
When subroutine MY_SUB is invoked, the executing image has access through the syntax Y(1,2)[3,4] to B(11) on the image with image index 33.