public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/102431] [12 Regression] ICE in lower_gimple_bind, at gimple-low.c:439 since r12-1206-g178191e1dfafd8db
Date: Mon, 29 Nov 2021 08:50:20 +0000	[thread overview]
Message-ID: <bug-102431-4-jq2fyj6TRf@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102431-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:f578f1828b1429728c5d104adf477859de0cf335

commit r11-9337-gf578f1828b1429728c5d104adf477859de0cf335
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Nov 23 10:30:02 2021 +0100

    openmp: Fix up handling of reduction clauses on the loop construct
[PR102431]

    We were using unshare_expr and walk_tree_without_duplicate replacement
    of the placeholder vars.  The OMP_CLAUSE_REDUCTION_{INIT,MERGE} can contain
    other trees that need to be duplicated though, e.g. BLOCKs referenced in
    BIND_EXPR(s), or local VAR_DECLs.  This patch uses the inliner code to copy
    all of that.  There is a slight complication that those local VAR_DECLs or
    placeholders don't have DECL_CONTEXT set, they will get that only when
    they are gimplified later on, so this patch sets DECL_CONTEXT for those
    temporarily and resets it afterwards.

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

            PR middle-end/102431
            * gimplify.c (replace_reduction_placeholders): Remove.
            (note_no_context_vars): New function.
            (gimplify_omp_loop): For OMP_PARALLEL's BIND_EXPR create a new
            BLOCK.  Use copy_tree_body_r with walk_tree instead of unshare_expr
            and replace_reduction_placeholders for duplication of
            OMP_CLAUSE_REDUCTION_{INIT,MERGE} expressions.  Ensure all
mentioned
            automatic vars have DECL_CONTEXT set to non-NULL before doing so
            and reset it afterwards for those vars and their corresponding
            vars.

            * c-c++-common/gomp/pr102431.c: New test.
            * g++.dg/gomp/pr102431.C: New test.

    (cherry picked from commit 5e9b973bd60185f221222022f56db7df3d92250e)

  parent reply	other threads:[~2021-11-29  8:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 19:16 [Bug fortran/102431] New: [12 Regression] ICE in lower_gimple_bind, at gimple-low.c:439 gscfq@t-online.de
2021-09-22  6:58 ` [Bug fortran/102431] " rguenth at gcc dot gnu.org
2021-09-27 13:15 ` [Bug fortran/102431] [12 Regression] ICE in lower_gimple_bind, at gimple-low.c:439 since r12-1206-g178191e1dfafd8db marxin at gcc dot gnu.org
2021-11-19 18:13 ` jakub at gcc dot gnu.org
2021-11-22 15:58 ` [Bug middle-end/102431] " jakub at gcc dot gnu.org
2021-11-23  9:33 ` cvs-commit at gcc dot gnu.org
2021-11-26 17:31 ` jakub at gcc dot gnu.org
2021-11-29  8:50 ` cvs-commit at gcc dot gnu.org [this message]
2022-05-10  8:21 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-102431-4-jq2fyj6TRf@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).