program test_allocate_zero implicit none real, allocatable :: foo(:,:) allocate(foo(0,5)) call print_arg(0, 5, foo(:,:)) deallocate(foo) contains subroutine print_arg(d1, d2, x) integer, intent(in) :: d1, d2 real, intent(in) :: x(d1,d2) print *, x end subroutine print_arg end program test_allocate_zero