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

            Bug ID: 123794
           Summary: [openmp] ice during GIMPLE pass: vect
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C++ code:

extern long a[];
#pragma omp declare simd
long my_fun(long);
long foo_i;
void foo() {
#pragma omp simd
  for (foo_i = 0; foo_i < 3; foo_i += 1)
    a[foo_i] = my_fun(foo_i);
}

compiled by recent gcc trunk, does this:

cvise $ ~/gcc/results/bin/gcc -c -w -fopenmp bug1175.cc
cvise $ ~/gcc/results/bin/gcc -c -w -fopenmp -O1 bug1175.cc
bug1175.cc: In function ‘void foo()’:
bug1175.cc:5:6: error: missing definition
    5 | void foo() {
      |      ^~~
for SSA_NAME: .MEM_9 in statement:
# .MEM_30 = VDEF <.MEM_9>
MEM <vector(2) long int> [(long int *)vectp_a.10_28] = vect__10.9_26;
during GIMPLE pass: vect
bug1175.cc:5:6: internal compiler error: verify_ssa failed

gcc 15.2.0 doesn't like it:

cvise $ ~/gcc/results.15.2.0/bin/gcc -c -w -fopenmp -O1 bug1175.cc
bug1175.cc: In function ‘void foo()’:
bug1175.cc:5:6: error: missing definition
    5 | void foo() {
      |      ^~~
for SSA_NAME: .MEM_9 in statement:
# .MEM_30 = VDEF <.MEM_9>
MEM <vector(2) long int> [(long int *)vectp_a.10_28] = vect__10.9_26;
during GIMPLE pass: vect
bug1175.cc:5:6: internal compiler error: verify_ssa failed

so the error is before then.

Reply via email to