"John Reid" <[log in to unmask]> wrote:
...
> The rules are designed to cover whether the compiler is allowed, not
> allowed, or permitted to perform copy-in/copy-out on an argument.
> In your example, this is not permitted since a pointer may be pointing
> to the actual argument. The rules were changed by an interpretation
> of Fortran 90 that was debated long and hard. You would have prefered
> the original rules.
>
> Given that copying is not allowed in this situation, the committee took
> the view that aliasing should be allowed, as in the direct use of the
> arrays.
Given that copying is not the only (or even the most common or
useful) reason that aliasing is traditionally disallowed, that is
a non-sequitur decision. Optimization is far more important
a reason to disallow aliasing. It remains important even when
arguments have TARGET attribute. Is that really an official
interp? Can the document be retrieved anywhere? I hope not.
--
J. Giles
|