https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67521

            Bug ID: 67521
           Summary: ICE when OpenMP loop expressions mention the IV
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

void
foo (int j)
{
  int i = 0;
  #pragma omp parallel for simd
  for (i = (i & j); i < 10; i = i + 2)
    ;
  i = 0;
  #pragma omp parallel for simd
  for (i = 0; i < (i & j) + 10; i = i + 2)
    ;
  i = 0;
  #pragma omp parallel for simd
  for (i = 0; i < 10; i = i + ((i & j) + 2))
    ;
}

ICEs, because the iterator is mentioned in the expressions.  Note if called
with
j = 0 supposedly the expressions should be still loop invariant.

Reply via email to