nvptx.c (global_lock_var): New.
gcc/
* config/nvptx/nvptx.c (global_lock_var): New.
(nvptx_global_lock_addr): New.
(nvptx_lockless_update): Recomment and adjust for clarity.
(nvptx_lockfull_update): New.
(nvptx_reduction_update): New.
(nvptx_goacc_reduction_fini): Call it.
libgcc/
* config/nvptx/reduction.c: New.
* config/nvptx/t-nvptx (LIB2ADD): Add it.
libgomp/
* testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Add
worker & gang cases.
* testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Likewise.
From-SVN: r230545