There is subroutine like
subroutine A(x, N1, N2, Y)
implicit none
integer N1, N2
real*8 X, Y(N1:N2), P/0.0d0/, Z
write(7, *) P
...
P = Z
...
end subroutine a
At first call of A variable P prints right value 0.0d0, but at second call it prints non zero value. How it could be possible?