subroutine foo(x) real, dimension(:), allocatable :: x allocate (x(2)) end subroutine program test interface subroutine foo(x) real, dimension(:), allocatable :: x end subroutine end interface real, allocatable :: t1(:) real :: t2(:) allocatable :: t2 call foo(t1) call foo(t2) end program