[Bug middle-end/101167] Miscompilation of task_reduction

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 23 08:06:29 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101167

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:679506c3830ea1a93c755413609bfac3538e2cbd

commit r12-1740-g679506c3830ea1a93c755413609bfac3538e2cbd
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Jun 23 10:03:28 2021 +0200

    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.


More information about the Gcc-bugs mailing list