https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85381
Tom de Vries <vries at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |openacc Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #10 from Tom de Vries <vries at gcc dot gnu.org> --- I've committed this workaround: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b957d7c71a0a8984a88f5bfccf5a4b6fd080c47d : ... [nvptx, openacc] Don't emit barriers for empty loops 2018-04-21 Tom de Vries <t...@codesourcery.com> PR target/85381 * config/nvptx/nvptx.c (nvptx_process_pars): Don't emit barriers for empty loops. * testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: New test. * testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: New test. * testsuite/libgomp.oacc-c-c++-common/pr85381-5.c: New test. * testsuite/libgomp.oacc-c-c++-common/pr85381.c: New test. ... Submitted here: https://gcc.gnu.org/ml/gcc-patches/2018-04/msg01023.html . This fixes the hang that I observed, so I'm closing this PR. [ If nvidia comes back with a clear workaround description, I'll implement that, but there's no point in keeping the PR open. ]