https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99740
--- Comment #3 from Paul A. Voytas <pvoytas at gmail dot com> --- I see what you mean--if i test for rand(0)=0.d0 I do get hist with gfortran on the EL7 machine. But it seems like there must still be something different from older versions. The info pages for rand() say "between 0 and 1" which I always took to be exclusive of the endpoints (of course there's machine precision). On CentOS6 with g77 when I run the above code I get no errors--even with 10x more attempts--and the test for rand(0)=0.d0 never is true. On that same CentOS6 machine with gfortran, code does show rand(0)=0.d0 cases (and the -log(rand(0)) returns +Infinity.