https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84028
Tom de Vries <vries at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |openacc Target| |nvptx --- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- Tentative patch adds an exit after $L27, and fixes the hang, both in the minimal and original testcase: ... diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index d8484120c9d..a6f444340fd 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -4065,8 +4065,8 @@ nvptx_single (unsigned mask, basic_block from, basic_block to) else { rtx_insn *label_insn = emit_label_after (label, tail); - if (mode == GOMP_DIM_VECTOR && CALL_P (tail) - && find_reg_note (tail, REG_NORETURN, NULL)) + if ((mode == GOMP_DIM_VECTOR || mode == GOMP_DIM_WORKER) + && CALL_P (tail) && find_reg_note (tail, REG_NORETURN, NULL)) emit_insn_after (gen_exit (), label_insn); } } ...