https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98185
--- Comment #2 from G. Steinmetz <gs...@t-online.de> --- Hmm, trying to provide some reductions along different paths : (iff there is no g++/gcc ICE, this PR can be closed then) (will eventually retry with some future snapshots) $ cat z1.C void foo (int *a) { #pragma omp parallel master default(none) private (k) } $ cat z2.C void foo (int *a) { int i, j, k, u = 0, v = 0, w = 0, x = 0, y = 0, z = 0; z += a[i]; #pragma omp parallel master taskloop reduction (+:u) default(none) firstprivate(a) } $ cat z3.C void bar (int *); void foo (int *a) { int i, j, k, u = 0, v = 0, w = 0, x = 0, y = 0, z = 0; { z += a[i]; } #pragma omp parallel master taskloop reduction (+:u) default(none) firstprivate(a) } $ cat z4.C void foo (int *a) { int i, j, k, u = 0, v = 0, w = 0, x = 0, y = 0, z = 0; { for (i = 0; i < 64; i++) for (i = 0; i < 64; ++i) z += a[i]; } #pragma omp parallel master taskloop reduction (+:u) default(none) firstprivate(a) } Yields : z1.C:5:1: internal compiler error: Segmentation fault, in cp_genericize_r at cp/cp-gimplify.c:1240 z1.C:5:1: internal compiler error: tree check: expected omp_clause, have <invalid tree code> in cp_genericize_r, at cp/cp-gimplify.c:1240 z2.C:7:1: internal compiler error: Segmentation fault, in cp_fold at cp/cp-gimplify.c:2223 z3.C:9:85: internal compiler error: in gimplify_scan_omp_clauses, at gimplify.c:9983 z3.C:10:1: internal compiler error: tree check: expected omp_clause, have <invalid tree code> in cp_genericize_r, at cp/cp-gimplify.c:1240 z4.C:11:1: internal compiler error: in tsi_link_after, at tree-iterator.c:193