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 tree-optimization/102505] [10/11/12 Regression] ICE in verify_sra_access_forest with 16 byte aligned field and virtual inheritance since r10-6321-g636e80eea24b780f
Date: Wed, 27 Oct 2021 17:17:12 +0000	[thread overview]
Message-ID: <bug-102505-4-jJKhXxfTDi@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102505-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Martin Jambor
<jamborm@gcc.gnu.org>:

https://gcc.gnu.org/g:97cebda80d367737c0b25909af8063b63166e00b

commit r11-9189-g97cebda80d367737c0b25909af8063b63166e00b
Author: Martin Jambor <mjambor@suse.cz>
Date:   Wed Oct 27 19:15:33 2021 +0200

    sra: Fix corner case of total scalarization with virtual inheritance (PR
102505)

    PR 102505 is a situation where of SRA takes its initial top-level
    access size from a get_ref_base_and_extent called on a COMPONENT_REF,
    and thus derived frm the FIELD_DECL, which however does not include a
    virtual base.  Total scalarization then goes on traversing the type,
    which however has virtual base past the non-virtual bits, tricking SRA
    to create sub-accesses outside of the supposedly encompassing
    accesses, which in turn triggers the verifier within the pass.

    The patch below fixes that by failing total scalarization when this
    situation is detected.

    This backport also has commit f217e87972a2a207e793101fc05cfc9dd095c678
    squashed into it in order to avoid PR 102886 that the fix introduced
    on trunk.

    gcc/ChangeLog:

    2021-10-20  Martin Jambor  <mjambor@suse.cz>

            PR tree-optimization/102505
            * tree-sra.c (totally_scalarize_subtree): Check that the
            encountered field fits within the acces we would like to put it
            in.

    gcc/testsuite/ChangeLog:

    2021-10-20  Martin Jambor  <mjambor@suse.cz>

            PR tree-optimization/102505
            * g++.dg/torture/pr102505.C: New test.

    (cherry picked from commit 701ee067807b80957c65bd7ff94b6099a27181de)

  parent reply	other threads:[~2021-10-27 17:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 19:49 [Bug c/102505] New: [10/11/12 Regression] ICE in verify_sra_access_forest, at tree-sra.c:2368 gscfq@t-online.de
2021-09-27 19:49 ` [Bug c/102505] " gscfq@t-online.de
2021-09-27 22:01 ` [Bug tree-optimization/102505] " pinskia at gcc dot gnu.org
2021-09-28  8:36 ` [Bug tree-optimization/102505] [10/11/12 Regression] ICE in verify_sra_access_forest with 16 byte aligned field and virtual inheritance rguenth at gcc dot gnu.org
2021-09-30  9:52 ` [Bug tree-optimization/102505] [10/11/12 Regression] ICE in verify_sra_access_forest with 16 byte aligned field and virtual inheritance since r10-6321-g636e80eea24b780f marxin at gcc dot gnu.org
2021-10-07 15:48 ` jamborm at gcc dot gnu.org
2021-10-21 10:58 ` jamborm at gcc dot gnu.org
2021-10-21 12:56 ` cvs-commit at gcc dot gnu.org
2021-10-25 13:27 ` cvs-commit at gcc dot gnu.org
2021-10-27 17:17 ` cvs-commit at gcc dot gnu.org [this message]
2021-11-02 10:19 ` cvs-commit at gcc dot gnu.org
2021-11-02 12:29 ` jamborm 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-102505-4-jJKhXxfTDi@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).