diff options
author | Tom de Vries <tdevries@suse.de> | 2019-01-15 10:11:16 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2019-01-15 10:11:16 +0000 |
commit | d41d952c9bbdffe6fd2badc9c4f2c18d241ce412 (patch) | |
tree | fdceb1ac2aa40eab19d344b5ab5e33831dd367bf /gcc/config/nvptx | |
parent | 4882e5badaad9a0174a8ace1d71448e0f824bdf1 (diff) | |
download | gcc-d41d952c9bbdffe6fd2badc9c4f2c18d241ce412.tar.gz |
[nvptx] Handle assignment to gang-level reduction variable
2019-01-15 Tom de Vries <tdevries@suse.de>
PR target/80547
* config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Handle
lhs == NULL_TREE for gang-level reduction.
* testsuite/libgomp.oacc-c-c++-common/gang-reduction-var-assignment.c:
New test.
From-SVN: r267934
Diffstat (limited to 'gcc/config/nvptx')
-rw-r--r-- | gcc/config/nvptx/nvptx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 03c0f82f4a2..23459e1c6f4 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -6242,7 +6242,8 @@ nvptx_goacc_reduction_init (gcall *call, offload_attrs *oa) init = var; } - gimplify_assign (lhs, init, &seq); + if (lhs != NULL_TREE) + gimplify_assign (lhs, init, &seq); } pop_gimplify_context (NULL); |