http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59591
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Slightly reduced fortran testcase for -O3 -mavx2: subroutine foo (m, n, o, p, q, e, a, b, x, f) integer, intent (in) :: n, o, p, q, m, f integer, dimension (n:o) :: e, a, b integer, dimension (n:o, p:q) :: x integer :: j, i do j = 1, m do i = n, f if (e(i) .eq. 0) then a(i) = x(i, b(i)) endif enddo enddo end subroutine foo and C testcase for -O3 -mavx2 -fopenmp-simd: int p[256], q[256], r[256], t[256]; void foo (void) { int i; #pragma omp simd safelen(64) for (i = 0; i < 256; i++) if (r[i] > 32) t[i] = p[q[i] * 3L + 2L]; }