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/90348] [9/10/11/12 Regression] Partition of char arrays is incorrect in some cases
Date: Fri, 04 Feb 2022 07:17:12 +0000	[thread overview]
Message-ID: <bug-90348-4-96ZqXWGKCD@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-90348-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #24 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:551aa75778a4c5165d9533cd447c8fc822f583e1

commit r12-7044-g551aa75778a4c5165d9533cd447c8fc822f583e1
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Feb 2 14:24:39 2022 +0100

    Add CLOBBER_EOL to mark storage end-of-life clobbers

    This adds a flag to CONSTRUCTOR nodes indicating that for
    clobbers this marks the end-of-life of storage as opposed to
    just ending the lifetime of the object that occupied it.
    The dangling pointer diagnostics uses CLOBBERs but is confused
    by those emitted by the C++ frontend for example which emits
    them for the second purpose at the start of CTORs.  The issue
    is also appearant for aarch64 in PR104092.

    Distinguishing the two cases is also necessary for the PR90348 fix.

    Since I'm going to add another flag I added an enum clobber_flags
    and a defaulted argument to build_clobber plus a convenient way to
    query the enum from the CTOR tree and specify it for gimple_clobber_p.
    Since 'CLOBBER' is already taken and I needed a name for the unspecified
    clobber we have now I used 'CLOBBER_UNDEF'.

    2022-02-03  Richard Biener  <rguenther@suse.de>

            PR middle-end/90348
            PR middle-end/104092
    gcc/
            * tree-core.h (clobber_kind): New enum.
            (tree_base::u::bits::address_space): Document use in CONSTRUCTORs.
            * tree.h (CLOBBER_KIND): Add.
            (build_clobber): Add clobber kind argument, defaulted to
            CLOBBER_UNDEF.
            * tree.cc (build_clobber): Likewise.
            * gimple.h (gimple_clobber_p): New overload with specified kind.
            * tree-streamer-in.cc (streamer_read_tree_bitfields): Stream
            CLOBBER_KIND.
            * tree-streamer-out.cc (streamer_write_tree_bitfields):
            Likewise.
            * tree-pretty-print.cc (dump_generic_node): Mark EOL CLOBBERs.
            * gimplify.cc (gimplify_bind_expr): Build storage end-of-life
clobbers
            with CLOBBER_EOL.
            (gimplify_target_expr): Likewise.
            * tree-inline.cc (expand_call_inline): Likewise.
            * tree-ssa-ccp.cc (insert_clobber_before_stack_restore): Likewise.
            * gimple-ssa-warn-access.cc (pass_waccess::check_stmt): Only treat
            CLOBBER_EOL clobbers as ending lifetime of storage.

    gcc/lto/
            * lto-common.cc (compare_tree_sccs_1): Compare CLOBBER_KIND.

    gcc/testsuite/
            * gcc.dg/pr87052.c: Adjust.

  parent reply	other threads:[~2022-02-04  7:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-90348-4@http.gcc.gnu.org/bugzilla/>
2021-05-14  9:51 ` jakub at gcc dot gnu.org
2021-06-01  8:14 ` rguenth at gcc dot gnu.org
2022-01-31 13:09 ` rguenth at gcc dot gnu.org
2022-02-04  7:17 ` cvs-commit at gcc dot gnu.org [this message]
2022-05-27  9:40 ` [Bug middle-end/90348] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:37 ` jakub at gcc dot gnu.org
2023-05-09 11:06 ` [Bug middle-end/90348] [10/11/12/13/14 " rguenth at gcc dot gnu.org
2023-07-07 10:35 ` [Bug middle-end/90348] [11/12/13/14 " rguenth at gcc dot gnu.org
2023-07-19 11:07 ` gnu.ojxq8 at dralias dot com
2023-07-19 11:37 ` rguenther at suse dot de
2024-01-16 10:51 ` cvs-commit at gcc dot gnu.org
2024-03-02  0:38 ` cvs-commit at gcc dot gnu.org
2024-03-04 12:11 ` [Bug middle-end/90348] [11/12 " jakub at gcc dot gnu.org
2024-06-11 10:36 ` cvs-commit at gcc dot gnu.org
2024-06-11 10:49 ` [Bug middle-end/90348] [11 " jakub 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-90348-4-96ZqXWGKCD@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).