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

            Bug ID: 106492
           Summary: ICE in #pragma omp for simd
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sandra at gcc dot gnu.org
  Target Milestone: ---

This is similar to PR106449; adding the simd keyword to an existing omp for
test case causes an ICE related to incompatible types.

Test case is derived from g++.dg/gomp/pr95063.C:

// PR c++/95063

template <typename T>
struct S {
  T a : 12;
  S () : a(0)
  {
#pragma omp for simd linear(a)
    for (int k = 0; k < 64; ++k)
      a++;
  }
};
struct U {
  int a : 12;
  U () : a(0)
  {
#pragma omp for simd linear(a)
    for (int k = 0; k < 64; ++k)
      a++;
  }
};

S<int> s;
U u;

$ x86_64-none-linux-gnu-g++ -fopenmp pr95063.C -S
pr95063.C: In constructor 'U::U()':
pr95063.C:19:8: error: type mismatch in binary expression
   19 |       a++;
      |       ~^~
<unnamed-signed:12>

<unnamed-signed:12>

int

a = a + D.2648;
during GIMPLE pass: omplower
pr95063.C:19:8: internal compiler error: 'verify_gimple' failed
0x1295c9d verify_gimple_in_seq(gimple*)
        /path/to/gcc/tree-cfg.cc:5220
0x1167b60 execute_function_todo
        /path/to/gcc/passes.cc:2093
0x1167fdb execute_todo
        /path/to/gcc/passes.cc:2145
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to