]> git.ipfire.org Git - thirdparty/gcc.git/commit
OpenACC: Fix reduction tree-sharing issue [PR106982]
authorTobias Burnus <tobias@codesourcery.com>
Mon, 26 Sep 2022 10:45:28 +0000 (12:45 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 26 Sep 2022 10:45:28 +0000 (12:45 +0200)
commitd3df98807b58df186061ad52ff87cc09ba593e9b
tree074360d892578a63fd2a22546a43a09fdf67555d
parent2387cfc7f6e2065f5c040d62763f6f3a5997a444
OpenACC: Fix reduction tree-sharing issue [PR106982]

The tree for var == incoming == outgound was
'MEM <double[5]> [(double *)&reduced]' which caused the ICE
"incorrect sharing of tree nodes".

PR middle-end/106982

gcc/ChangeLog:

* omp-low.cc (lower_oacc_reductions): Add some unshare_expr.

gcc/testsuite/ChangeLog:

* c-c++-common/goacc/reduction-7.c: New test.
* c-c++-common/goacc/reduction-8.c: New test.
gcc/omp-low.cc
gcc/testsuite/c-c++-common/goacc/reduction-7.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/goacc/reduction-8.c [new file with mode: 0644]