https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111428
--- Comment #3 from Robin Dapp <rdapp at gcc dot gnu.org> --- Still difficult to track down. The following is a smaller reproducer: program main implicit none integer, parameter :: n=5, m=3 integer, dimension(n,m) :: v real, dimension(n,m) :: r do call random_number(r) v = int(r * 2) if (count(v < 1) > 1) exit end do write (*,*) 'asdf' end program main I compiled libgfortran without vector but this doesn't change anything. It's really just the vectorization of that snippet but I haven't figured out why, yet. The stack before the random_number call looks identical. Also tried valgrind which complains about compares dependent on uninitialized data (those only show up once compiled with vectorization). However I suspect those are false negatives after chasing them for some hours. Going to try another angle of attack. Maybe it's a really simple thing I overlooked.