[Bug fortran/112764] Associating entity does not have target attribute if selector has pointer attribute in associate block

mscfd at gmx dot net gcc-bugzilla@gcc.gnu.org
Fri Dec 1 05:29:25 GMT 2023


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112764

--- Comment #10 from martin <mscfd at gmx dot net> ---
Thanks for the speedy fix! I just thought about a variation, which should now
with the fix work as well (was not yet able to compile current dev branch, so
cannot check myself):


program assoc_ptr_in

implicit none

integer, dimension(:,:), pointer :: x
integer, pointer :: j

allocate(x(1:100,1:2), source=123)
associate(i1 => x(:,1))
   call sub(i1)
end associate
deallocate(x)

contains

subroutine sub(j)
   integer, dimension(:), pointer, intent(in) :: j
   print *,j(1)
end subroutine sub

end program assoc_ptr_in


More information about the Gcc-bugs mailing list