This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/84028] [nvptx] nested-function-1.f90 hangs at -O1
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 24 Jan 2018 17:53:03 +0000
- Subject: [Bug target/84028] [nvptx] nested-function-1.f90 hangs at -O1
- Auto-submitted: auto-generated
- References: <bug-84028-4@http.gcc.gnu.org/bugzilla/>
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);
}
}
...