Pointer Arguments
A dummy argument is a pointer if it is declared with the POINTER attribute. The actual argument associated with a dummy pointer argument cannot be a coindexed object. If the dummy pointer argument has the CONTIGUOUS attribute, the actual argument must be simply contiguous.
If a pointer dummy argument does not have the INTENT (IN) attribute, the actual argument must be a pointer. Otherwise, the actual argument must either be a pointer or a valid target for the dummy pointer in a pointer assignment statement. If the actual argument is not a pointer, the dummy argument pointer becomes pointer associated with the actual non-pointer argument.
If a pointer dummy argument has the INTENT (OUT) attribute, the pointer association status of a corresponding actual pointer argument becomes undefined when the procedure is invoked.
When a procedure is invoked and the actual argument is a pointer, the dummy argument pointer receives the pointer association status of the actual argument. If the actual argument is currently associated, the dummy argument becomes associated with the same target. The pointer association status of the dummy argument can change during the execution of the procedure, and any such changes are reflected in the actual argument.
If both the dummy and actual arguments are pointers, an explicit interface is required.
An actual argument that is a pointer can be associated with a nonpointer dummy argument. In this case, the actual argument is associated with a target and the dummy argument, through argument association, also becomes associated with that target.
If the dummy argument does not have the TARGET or POINTER attribute, any pointers associated with the actual argument do not become associated with the corresponding dummy argument when the procedure is invoked.
If the dummy argument has the TARGET attribute, and is either a scalar or assumed-shape array, and the corresponding actual argument has the TARGET attribute but is not an array section with a vector subscript, the following occurs:
Any pointer associated with the actual argument becomes associated with the corresponding dummy argument when the procedure is invoked.
Any pointers associated with the dummy argument remain associated with the actual argument when execution of the procedure completes.
If the dummy argument has the TARGET attribute, and is an explicit-shape or assumed-size array, and the corresponding actual argument has the TARGET attribute but is not an array section with a vector subscript, association of actual and corresponding dummy arguments when the procedure is invoked or when execution is completed is processor dependent.
If the dummy argument has the TARGET attribute and the corresponding actual argument does not have that attribute or is an array section with a vector subscript, any pointer associated with the dummy argument becomes undefined when execution of the procedure completes.