https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106982
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tobias Burnus <bur...@gcc.gnu.org>: https://gcc.gnu.org/g:d3df98807b58df186061ad52ff87cc09ba593e9b commit r13-2868-gd3df98807b58df186061ad52ff87cc09ba593e9b Author: Tobias Burnus <tob...@codesourcery.com> Date: Mon Sep 26 12:45:28 2022 +0200 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.