(j3.2006) Disassociated array pointer actual argument corresponding to an optional argument of elemental procedure.
Daniel C Chen
Mon Dec 8 15:12:07 EST 2014
Is the following program standard conforming?
integer, pointer :: p1(:)
call sub1(p1, k)
impure elemental subroutine sub1(arg1, arg2)
integer, intent(inout), optional :: arg1
integer, intent(in) :: arg2
P1 is disassocated, but its extent is used to scalarize the elemental
procedure call. Is this code standard conforming?
The only thing I found that is sort of relevant in the standard is
[126.96.36.199: p3: (6)]
"An optional dummy argument that is not present is subject to the following
(6) If it is an array, it shall not be supplied as an actual argument to an
elemental procedure unless an array of the same rank is supplied as an
actual argument corresponding to a nonoptional dummy argument of that
Do we need something similar to this for the test case at the above?
XL Fortran Development - IBM Toronto Software Lab
Email: cdchen at ca.ibm.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the J3