https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109622
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jules at gcc dot gnu.org Summary|[13/14 regression] internal |[13/14 regression][OpenACC] |compiler error: in |internal compiler error: in |omp_group_base, at |omp_group_base, at |gimplify.cc:9412 if |gimplify.cc:9412 if |-fopenacc is set. |-fopenacc is set. --- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> --- The ICE is in omp_group_base, which was added by Julian in r13-2661-gb57abd072dd319a72839a49e769bffc244a52bc0 and updated in later commits. The debugger shows: Breakpoint 1, omp_index_mapping_groups_1 (grpmap=0x2d2f960, groups=0x2cc4700, reindex_sentinel=0x0) at ../../repos/gcc/gcc/gimplify.cc:9426 9426 { (gdb) n 9431 FOR_EACH_VEC_ELT (*groups, i, grp) ... 9441 tree node = omp_group_base (grp, &chained, &fpp); for the last grp (i = 1, there are only 2). 9292 omp_group_base (omp_mapping_group *grp, unsigned int *chained, 9293 tree *firstprivate) 9294 { 9295 tree node = *grp->grp_start; (gdb) p debug(*grp->grp_start) map(attach_detach:atransform2->next [bias: 0]) Which fails at 'gcc_unreachable' for 'switch (OMP_CLAUSE_MAP_KIND (node))'. * * * I note that case GOMP_MAP_ATTACH: case GOMP_MAP_DETACH: are handled but GOMP_MAP_ATTACH_DETACH isn't. Actually, it is handled but not as separate input but as: case ....: ... node = OMP_CLAUSE_CHAIN (node); switch (OMP_CLAUSE_MAP_KIND (node)) ... case GOMP_MAP_ATTACH_DETACH: * * * The original input is ("debug(...)" for i = 0, which shows i=0 and i=1): map(attach:*atransform2->next [bias: 184]) map(attach_detach:atransform2->next [bias: 0]) which is fine, but as FOR_EACH_VEC_ELT (*groups, i, grp) then also processes i=1 separately, it fails.