http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57023
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2013-04-21 15:54:00 UTC --- We also have to watch out for module mymod contains subroutine foo(a,n) integer, dimension(n,n), intent(inout) :: a integer :: n call decrement(n) call baz(a(1:n,1:n),n) end subroutine foo subroutine baz(a,n) integer, dimension(n,n), intent(inout) :: a a = 1 end subroutine baz subroutine decrement(n) integer :: n n = n - 1 end subroutine decrement end module mymod program main use mymod integer, dimension(5,5) :: a n = 5 a = 0 call foo(a,n) print '(5I2)',a end program main