! { dg-do compile }
! { dg-options "-mso -O3" }
subroutine foo(rm, n, ipr)
  implicit none
  integer :: n, ipr, i, k
  real :: rm(n, n)

  do i = 1,n
     if(i.eq.ipr)then
        do k=1,n
           print *,'2',rm(i,k)
        enddo
     endif
  enddo
end subroutine foo
