1 2 3 4 5 6 7 8 9 10 11 12 13 14
! { 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