program main implicit none integer x(3) x = 99 call sub(x, 4) print *, x end program subroutine sub(a, n) implicit none integer n integer a(n) ! 配列の寸法が一致していない! a(1) = 100 end subroutine