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/108522] [12/13 Regression] ICE in tree-object-size when struct has VLA
Date: Thu, 26 Jan 2023 12:21:11 +0000	[thread overview]
Message-ID: <bug-108522-4-UESHWPUrPe@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108522-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Siddhesh Poyarekar
<siddhesh@gcc.gnu.org>:

https://gcc.gnu.org/g:0573a0778af88e805f7630ac8640ecd67d692665

commit r13-5382-g0573a0778af88e805f7630ac8640ecd67d692665
Author: Siddhesh Poyarekar <siddhesh@gotplt.org>
Date:   Thu Jan 26 07:07:03 2023 -0500

    tree-optimization/108522 Use component_ref_field_offset

    Instead of using TREE_OPERAND (expr, 2) directly, use
    component_ref_field_offset instead, which does scaling for us.  The
    function also substitutes PLACEHOLDER_EXPRs but it is not relevant for
    tree-object-size.

    gcc/ChangeLog:

            PR tree-optimization/108522
            * tree-object-size.cc (compute_object_offset): Make EXPR
            argument non-const.  Call component_ref_field_offset.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/108522
            * gcc.dg/builtin-dynamic-object-size-0.c (DEFSTRUCT): New
            macro.
            (test_dynarray_struct_member_b, test_dynarray_struct_member_c,
            test_dynarray_struct_member_d,
            test_dynarray_struct_member_subobj_b,
            test_dynarray_struct_member_subobj_c,
            test_dynarray_struct_member_subobj_d): New tests.
            (main): Call them.

    Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>

  parent reply	other threads:[~2023-01-26 12:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 16:52 [Bug tree-optimization/108522] New: [Regression 12/13] " siddhesh at gcc dot gnu.org
2023-01-24 16:53 ` [Bug tree-optimization/108522] " siddhesh at gcc dot gnu.org
2023-01-24 18:27 ` [Bug tree-optimization/108522] [12/13 Regression] " jakub at gcc dot gnu.org
2023-01-24 18:28 ` jakub at gcc dot gnu.org
2023-01-25  0:47 ` cvs-commit at gcc dot gnu.org
2023-01-26 12:21 ` cvs-commit at gcc dot gnu.org [this message]
2023-02-07 20:03 ` [Bug tree-optimization/108522] [12 " cvs-commit at gcc dot gnu.org
2023-02-07 20:03 ` cvs-commit at gcc dot gnu.org
2023-02-07 20:05 ` siddhesh 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-108522-4-UESHWPUrPe@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).