I work with very long arrays. I noticed that when an array’s size is beyond the limit of integer(4), size(x) will stop working on GFortran.
program size_test
integer(8) :: n
real(8), allocatable :: x(:)
n = 3d9
allocate(x(n))
print *, size(x)
end program