https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85381
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
This looks like a JIT bug, but with this tentative patch:
...
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index 8c478c874bd..ac394ee1ae6 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -4479,7 +4479,7 @@ nvptx_process_pars (parallel *par)
threads = nvptx_mach_vector_length ();
}
- if (!empty || !is_call)
+ if (!(empty || is_call))
{
/* Insert begin and end synchronizations. */
emit_insn_before (nvptx_cta_sync (barrier, threads),
...
no barriers are generated, and the minimized testcase passes.