https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104968
--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Tom de Vries from comment #5) > This patch fixes the ICE at openmp level: > ... > diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc > index 139a0de6100..19af384c634 100644 > --- a/gcc/gimplify.cc > +++ b/gcc/gimplify.cc > @@ -13361,6 +13361,7 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p) > g = gimple_build_bind (NULL_TREE, gfor, NULL_TREE); > g = gimple_build_omp_task (g, task_clauses, NULL_TREE, NULL_TREE, > NULL_TREE, NULL_TREE, NULL_TREE); > + gimple_set_location (g, EXPR_LOCATION (*expr_p)); > gimple_omp_task_set_taskloop_p (g, true); > g = gimple_build_bind (NULL_TREE, g, NULL_TREE); > gomp_for *gforo > ... Submitted a more complete patch here ( https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591954.html ).