(root)/
gcc-13.2.0/
gcc/
testsuite/
gfortran.dg/
pr45337_1.f90
! { dg-do compile }

module ptrmod
contains
subroutine lengthX(x, i) ! { dg-error "Dummy 'x' at .1. cannot have an initializer" }
   implicit none
   real, pointer, intent(out) :: x(:)=>null()
   integer :: i
   x=>null()
   allocate(x(i))
   x=i
end subroutine
end module