program main implicit none integer i do i = 1, 10 call sub(i) print *, i end do end program subroutine sub(i) implicit none integer i i = i + 1 ! ここで値を変更してはいけない! end subroutine