This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/84028] [nvptx] nested-function-1.f90 hangs at -O1


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);
          }
       }
...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]