[Bug target/84028] [nvptx] nested-function-1.f90 hangs at -O1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84028 Tom de Vries changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Assignee|unassigned at gcc dot gnu.org |vries at gcc dot gnu.org Target Milestone|--- |8.0 --- Comment #3 from Tom de Vries --- patch with test-case committed, marking resolved fixed.
[Bug target/84028] [nvptx] nested-function-1.f90 hangs at -O1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84028 --- Comment #2 from Tom de Vries --- Author: vries Date: Thu Jan 25 10:25:14 2018 New Revision: 257046 URL: https://gcc.gnu.org/viewcvs?rev=257046=gcc=rev Log: [nvptx, PR84028] Add exit insn after noreturn call for neutered workers 2018-01-25 Tom de VriesPR target/84028 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call for neutered workers. * testsuite/libgomp.oacc-fortran/pr84028.f90: New test. Added: trunk/libgomp/testsuite/libgomp.oacc-fortran/pr84028.f90 Modified: trunk/gcc/ChangeLog trunk/gcc/config/nvptx/nvptx.c trunk/libgomp/ChangeLog
[Bug target/84028] [nvptx] nested-function-1.f90 hangs at -O1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84028 Tom de Vries changed: What|Removed |Added Keywords||openacc Target||nvptx --- Comment #1 from Tom de Vries --- 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); } } ...