next up previous contents
Next: Restrictions on Pointers and Up: Pointers Previous: Mapped Pointers

Pointers and Subprograms

If a pointer dummy argument is not explicitly mapped, then the actual argument must also not be explicitly mapped.

If a pointer dummy argument has an explicit mapping, then the actual argument must follow the rules for pointer assignment as stated above, with one exception: If the actual argument has the DYNAMIC attribute, it is not necessary that the corresponding dummy argument have the DYNAMIC attribute. That is, item 3 on page gif is weakened to

3.
If a pointer dummy argument has the DYNAMIC attribute, then the corresponding actual argument must also have the DYNAMIC attribute.

A range declaration (see Section 8.11) can be used to restrict the set of distribution formats of the actual.

A pointer dummy argument may have the DYNAMIC attribute. In this case, the actual argument must also have the DYNAMIC attribute. The target associated with the dummy argument may be redistributed under the restrictions stated in the last subsection. Following Fortran rules, if the actual is also visible (through host- or use-association), the target may be redistributed only through the dummy argument. If the dummy argument is redistributed, then the actual argument has the new mapping on return from the procedure. In such a case, the new mapping must match the range restrictions (if any) of the actual.