J3/15-239 To: J3 Members From: Van Snyder Subject: Problem with TARGET, dummy arguments, undefinition Date: 2015 October 09 1. Introduction =============== Suppose one has type :: T real, allocatable :: C1(:) real, pointer :: P2(:,:) end type T subroutine S ( A, I, J ) type(t), intent(out), target :: A allocate ( a%c1(i*j) a%p2(1:i,1:j) => a%c1 end subroutine S Since we haven't provided the TARGET attribute for components, this requires the effective argument to have the TARGET attribute, else the association status of the P2 component becomes undefined when S returns. This is absurd. I hope we don't need to go to WG5 to get permission to repair this oversight. Maybe it needs an interp. 2. Edits ======== [300:13 12.5.2.4p11 Ordinary dummy variables] After "completes" insert ", unless the pointer and target are components of the same derived-type dummy argument".