On Wed, Apr 27, 2011 at 9:03 PM, Jim Xia <[log in to unmask]> wrote:
> I don't see how 12.5.2.7p2 contradicts 12.5.2.5. 12.5.2.5 states the rules
> applied to both POINTER and ALLOCATABLE dummies, and 12.5.2.7 lists further
> restrictions on POINTER dummies. So you should combine them together to get
> a full picture.
>
> 12.5.2.7p2 states that an actual associated with a poly-pointer dummy could
> be a target if the dummy has INTENT(IN). That doesn't say the actual could
> be a non-poly-target (because 12.5.2.5 says you couldn't). The actual arg,
> in this case, could be a poly dummy arg with TARGET attribute or a poly
> allocatable with a TARGET attribute.
I have to defer to you compiler people whose job it is to deal with this stuff
day in and day out. But to me 12.5.2.7p2 is unambiguous in stating that an
INTENT(IN) polymorphic dummy pointer can be associated with a non-pointer
actual if it would be a valid target of the pointer. There's no indication or
allowance there that there might be exceptions. 12.5.2.5 also seems
unambiguous. Restricting the interpretation of 12.5.2.7p2 while preserving
12.5.2.5 as you suggest is one way of resolving the conflict, but I think one
could then argue equally well that 12.2.5.2 could be restricted in light of
12.5.2.7b.
-Neil
|