(j3.2006) Alleged contradiction, was Re: Still illegal in F08?
Malcolm Cohen
malcolm
Thu Jan 14 22:39:54 EST 2010
Robert Corbett wrote:
> Section 5.3.10, paragraph 2, page 97, states
>
> The INTENT(IN) attribute for a pointer dummy argument
> specifies that during the invocation and execution of
> the procedure its association shall not be changed
>
> except that it may become undefined if the target is
> deallocated other than through the pointer (16.5.2.5).
>
> The "except" portion of the quoted text makes it seem as if
> the target of a pointer dummy argument is permitted to be
> "deallocated other than through the pointer."
Yes.
> Section 12.5.2.13, paragraph 1, page 300 states
>
> While an entity is associated with a dummy argument,
> the following restrictions hold.
>
> (1) Action that affects the allocation status of
> the entity or a subobject thereof shall be
> taken through the dummy argument.
>
> That text seems to say that a target associated with a
> pointer dummy argument can only be deallocated through the
> pointer.
No, on a sufficiently careful reading it does not seem to say that.
Allocation status is for allocatable variables.
*Association* status is for pointers.
Therefore there is no contradiction.
> Therefore, the "except" clause quoted above
> cannot apply to a standard-conforming program.
Contrariwise.
Cheers,
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list