program main implicit none integer, allocatable :: a(:) allocate (a(3)) call sub(a) end program subroutine sub(x) implicit none integer x(3) print *, x ! 初期化されていない x を参照している! end subroutine