Were their arrays very small? @lionel provides a much more rigorous example, and fixed-size arrays might (depending on size and compiler options) provide very different results but even this simple program immediately starts showing non-zero values using a very simple loop. The last time I remember seeing a compiler that initialized to zero by default was when I had an argument about depending on this with a colleague too, but that was a long time ago when he was developing on a VAX/VMS system and we needed the resulting code to work on a platform where setting to zero was definitely not the default. It has been too long, but as I remember it
the default on a VAX/VMS F77 compiler was zero.
program zero
implicit none
integer,allocatable :: b(:)
integer :: i
integer :: counts
do i=1,1000000000
if(allocated(b))deallocate(b)
allocate(b(i))
counts=count(b.ne.0)
if(counts.ne.0)then
b=pack(b,b.ne.0)
write(*,'(*(g0,1x))')'counts=',counts,'out of',i,'sample', b(1:min(size(b),10))
endif
enddo
end program zero
on your platform when does this first find a non-zero value?