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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:23d16b36eb41366841af052c35f335f35ee203cc

commit r11-10699-g23d16b36eb41366841af052c35f335f35ee203cc
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Thu Jan 19 21:00:08 2023 +0100

    openmp: Fix up OpenMP expansion of non-rectangular loops [PR108459]

    expand_omp_for_init_counts was using for the case where collapse(2)
    inner loop has init expression dependent on non-constant multiple of
    the outer iterator and the condition upper bound expression doesn't
    depend on the outer iterator fold_unary (NEGATE_EXPR, ...).  This
    will just return NULL if it can't be folded, we need fold_build1
    instead.

    2023-01-19  Jakub Jelinek  <ja...@redhat.com>

            PR middle-end/108459
            * omp-expand.c (expand_omp_for_init_counts): Use fold_build1 rather
            than fold_unary for NEGATE_EXPR.

            * testsuite/libgomp.c/pr108459.c: New test.

    (cherry picked from commit 46644ec99cb355845b23bb1d02775c057ed8ee88)

Reply via email to