title: keeping array limits in fortran during subroutine call
body: <p>I have the following program</p>
  
  <pre><code>module test
  contains
     subroutine foo()
        integer, allocatable :: a(:)
        allocate(a(-5:5))
        call bar(a)
        print *, a
     end subroutine
     subroutine bar(a)
        integer, intent(out) :: a(:)
        a = 0 
        a(-4) = 3  ! here
        a(2) = 3   
     end subroutine
  end module
  
  program x
     use test
     call foo()
  end program
  </code></pre>
  
  <p>In the line marked with "here" I am doing something wrong. The fact is that when I receive the array <code>a</code> (in the caller allocated from -5 to +5), the callee uses conventional numbering (1 to n), meaning that assigning -4 I am doing an out of boundary assignment. How can I instruct the compiler that, within the <code>bar</code> routine, the numbering of the <code>a</code> array must be the same as in the caller ?</p>