      module modn
      integer :: n=10
      end module modn
 
      program bnd4
      use modn
      integer ii(10)
      n = 10
      do i = 1 , 10
         ii(i) = i+i
      enddo
      call sub(ii)
      end
 
      subroutine sub(x)
      use modn
      integer x(n)
      do i = 2 , 11
         x(i) = x(i-1)
         print * , i , x(i-1)
      enddo
      end
