]> 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>
Thu, 29 Sep 2022 11:14:35 +0000 (13:14 +0200)
commitafea1ae84f0c3e64137289c44c756195babe1845
tree371c111e0dbd33a43623766e7b5b2c3f25ee4dc2
parent7f323c284f785397c9794c1936aacbcd7cc63ba8
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.

(cherry picked from commit d3df98807b58df186061ad52ff87cc09ba593e9b)
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]