public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105726] spurious warning with -Warray-bounds Date: Wed, 25 May 2022 07:42:51 +0000 [thread overview] Message-ID: <bug-105726-4-uMGMN7e9PA@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105726-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105726 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Blocks| |56456 Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2022-05-25 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. At -O1 emitted by the warn_restrict pass on <bb 2> [local count: 1073741824]: _3 = &MEM[(const struct array *)aMessage_1(D) + 4B]._M_elems; strncpy (aBuffer_4(D), _3, 1); return; <addr_expr 0x7ffff5d83c00 type <pointer_type 0x7ffff5d86e70 type <array_type 0x7ffff5d86dc8 _Type type <integer_type 0x7ffff6544540 char> type_6 QI size <integer_cst 0x7ffff653a048 constant 8> unit-size <integer_cst 0x7ffff653a060 constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff5d86d20 domain <integer_type 0x7ffff6542c78> pointer_to_this <pointer_type 0x7ffff5d86e70>> unsigned DI size <integer_cst 0x7ffff6517f48 constant 64> unit-size <integer_cst 0x7ffff6517f60 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff5d86f18> readonly arg:0 <component_ref 0x7ffff5d50bd0 type <array_type 0x7ffff5d862a0 type <integer_type 0x7ffff65383f0 char> readonly type_6 QI size <integer_cst 0x7ffff653a048 8> unit-size <integer_cst 0x7ffff653a060 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff5d862a0 domain <integer_type 0x7ffff6542c78>> readonly arg:0 <mem_ref 0x7ffff5d891e0 type <record_type 0x7ffff5d7f888 array> arg:0 <ssa_name 0x7ffff5cf84c8 type <reference_type 0x7ffff5d86888> visited var <parm_decl 0x7ffff5d85400 aMessage> def_stmt GIMPLE_NOP version:1 ptr-info 0x7ffff5d7b8e8> arg:1 <integer_cst 0x7ffff5d7b7c8 constant 4>> arg:1 <field_decl 0x7ffff5d7c720 _M_elems type <array_type 0x7ffff5d7ddc8 _Type> I think the pass mis-analyzes the reference. Let me have a look. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 [Bug 56456] [meta-bug] bogus/missing -Warray-bounds
next prev parent reply other threads:[~2022-05-25 7:42 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-25 4:10 [Bug c++/105726] New: " cuzdav at gmail dot com 2022-05-25 7:42 ` rguenth at gcc dot gnu.org [this message] 2022-05-25 8:39 ` [Bug c++/105726] " rguenth at gcc dot gnu.org 2022-05-25 8:41 ` rguenth at gcc dot gnu.org 2022-05-25 9:46 ` rguenth at gcc dot gnu.org 2022-05-25 9:52 ` [Bug tree-optimization/105726] [10/11/12/13 Regression] " rguenth at gcc dot gnu.org 2022-05-27 9:42 ` cvs-commit at gcc dot gnu.org 2022-05-27 9:43 ` [Bug tree-optimization/105726] [10/11/12 " rguenth at gcc dot gnu.org 2022-06-02 9:40 ` cvs-commit at gcc dot gnu.org 2022-06-15 8:59 ` [Bug tree-optimization/105726] [10/11 " cvs-commit at gcc dot gnu.org 2022-06-15 9:49 ` cvs-commit at gcc dot gnu.org 2022-06-15 9:50 ` rguenth 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-105726-4-uMGMN7e9PA@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: linkBe 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).