module mod

implicit none
private

public g, s

interface g
   module procedure s
end interface g

contains

subroutine s(x)
   integer, dimension(:), pointer, intent(in)  :: x
end subroutine s

end module mod


program automatic_pointer_generic

use mod
implicit none

integer, dimension(1:3), target :: a

a = 1
call g(a)
! directly calling s compiles
!call s(a)

end program automatic_pointer_generic
