Hi, the following *legal Fortran 95* code is falsely rejected by gfortran. Note that this differs from PR 29624 which specifies a F2003 feature for pointers. % cat gfcbug52.f90 program gfcbug52 implicit none type t integer, pointer :: p(:) => NULL () end type t type(t) :: a allocate (a%p(1)) call set (a) print *, a%p(1) contains subroutine set (b) type(t), intent(in) :: b if (associated (b%p)) b%p(1) = 1 end subroutine set end program gfcbug52 % gfc gfcbug52.f90 gfcbug52.f90:18.27: if (associated (b%p)) b%p(1) = 1 1 Error: Can't assign to INTENT(IN) variable 'b' at (1)
(In reply to comment #0) It appears that the fix to PR 29624 also fixed this one properly.
> It appears that the fix to PR 29624 also fixed this one properly. So far I had only managed to cause collateral damage not collateral fixes :-)
This is indeed fixed. Paul