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

            Bug ID: 122517
           Summary: [OpenMP] ICE in gimplify_adjust_omp_clauses for 'omp
                    parallel' with 'shared' clause + 'omp interop'
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openmp
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

The following ICE is a bit odd – it works without 'shared' clause, it works
without 'interop', but if there is any 'shared' clause (for 'intop' or 'n'), it
gives an ICE?!?

--------------
0xe47fae gimplify_adjust_omp_clauses
        ../../../repos/gcc/gcc/gimplify.cc:15677
0xe4abb9 gimplify_omp_parallel
        ../../../repos/gcc/gcc/gimplify.cc:16673
0xe42cb1 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../../repos/gcc/gcc/gimplify.cc:20864
--------------


#include <omp.h>

void f(int n)
{
  omp_interop_t intop = omp_interop_none;
  #pragma omp parallel shared(n) //shared(intop)
  {
    // intop = omp_interop_none;
    #pragma omp interop init(target : intop)
  }
}

Reply via email to