[J3] 15.5.2.5 Allocatable and pointer dummy variables

Malcolm Cohen malcolm at nag-j.co.jp
Wed Sep 2 21:01:29 EDT 2020


>Can I just additionally ask you if my interpretation of the auto-targetting feature is correct and if these two examples:
>
>Subroutine sp1(p)
>Class(t1), pointer, Intent(In) :: p
>...
>
>type(t3), pointer :: pt
>...
>call sp1(pt)
>
>class(t3), pointer :: pc
>...
>call sp1(pc)
>
>are correct or not?

They are invalid; the actual argument and the dummy argument both have the POINTER attribute, but they have different declared types.

Auto-targetting for dummy data objects only applies to actual arguments with the TARGET attribute.

Cheers,
-- 
..............Malcolm Cohen, NAG Oxford/Tokyo.




More information about the J3 mailing list