]> gcc.gnu.org Git - gcc.git/commit
openmp: Fix up *_reduction clause handling with UDRs on PARM_DECLs [PR101167]
authorJakub Jelinek <jakub@redhat.com>
Wed, 23 Jun 2021 08:03:28 +0000 (10:03 +0200)
committerJakub Jelinek <jakub@redhat.com>
Wed, 23 Jun 2021 13:13:54 +0000 (15:13 +0200)
commitf50a222dffb448ef5c69a64b6945acafc6b16e12
tree8326e49ac9025f8bfa2df8503f35b3ce6eea5e38
parentb6e4453172e6502318d31517b7d3771b157ae71a
openmp: Fix up *_reduction clause handling with UDRs on PARM_DECLs [PR101167]

The following testcase FAILs, because the UDR combiner is invoked incorrectly.
lower_omp_rec_clauses expects that when it sets
DECL_VALUE_EXPR/DECL_HAS_VALUE_EXPR_P
for both the placeholder and the var that everything will be properly
regimplified, but as the variable in question is a PARM_DECL rather than
VAR_DECL, lower_omp_regimplify_p doesn't say that it should be regimplified
and so it is not.

2021-06-23  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/101167
* omp-low.c (lower_omp_regimplify_p): Regimplify also PARM_DECLs
and RESULT_DECLs that have DECL_HAS_VALUE_EXPR_P set.

* testsuite/libgomp.c-c++-common/task-reduction-15.c: New test.

(cherry picked from commit 679506c3830ea1a93c755413609bfac3538e2cbd)
gcc/omp-low.c
libgomp/testsuite/libgomp.c-c++-common/task-reduction-15.c [new file with mode: 0644]
This page took 0.057757 seconds and 6 git commands to generate.