(j3.2006) Allowed but not desired?
Van Snyder
Van.Snyder
Tue Oct 7 14:59:16 EDT 2014
This appears to be allowed, but I think it's not what we want:
module M
type :: T1
type(lock_type) :: L
end type T1
type :: T2
type(t1), allocatable :: C
end type T2
...
contains
subroutine S ( A )
type(t2), intent(out) :: A
...
This appears to be wrong, on two counts.
First, the intent of C1303 is probably that A%C%L ought to be a coarray,
somewhere along the line. But A%C%L is not a subcomponent of A, because
A%C is allocatable. Therefore, C1303 does not apply, at least not to
the declaration of A. Maybe it applies if A%C or A%C%L are ever
referenced.
Second, A has intent(out). The intent of C547 is that A%C%L not become
undefined due to deallocation of A%C because A is intent(out).
But A%C%L is not a subcomponent of A, because A%C is allocatable.
Therefore, C547 does not apply.
Is this what we wanted?
More information about the J3
mailing list