public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/42577] array bounds false positive with -O3, goes away with -O2 Date: Fri, 01 Jan 2010 22:42:00 -0000 [thread overview] Message-ID: <20100101224200.812.qmail@sourceware.org> (raw) In-Reply-To: <bug-42577-8137@http.gcc.gnu.org/bugzilla/> ------- Comment #3 from rguenth at gcc dot gnu dot org 2010-01-01 22:42 ------- The array indexing is done with D.25175_104, but D.25173_102 = (uint16) cutawaySlot_256; D.25174_103 = D.25173_102 + 10; D.25175_104 = (int) D.25174_103; ... if (D.25174_103 > 9) goto <bb 26>; else goto <bb 30>; the actual check is done on D.25174_103. We do not add asserts for D.25175_104 on the edge to BB30. D.25174 is unsigned short. So we end up with D.25173_102: [0, 1] D.25174_103: [10, 11] D.25175_104: [10, 11] and warn for the access that is dominated by BB30. So the issue is that we warn for dead code. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42577
next prev parent reply other threads:[~2010-01-01 22:42 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-01-01 21:01 [Bug middle-end/42577] New: " matt at use dot net 2010-01-01 21:02 ` [Bug middle-end/42577] " matt at use dot net 2010-01-01 21:16 ` matt at use dot net 2010-01-01 22:42 ` rguenth at gcc dot gnu dot org [this message] 2010-01-02 14:57 ` rguenth at gcc dot gnu dot org 2010-01-02 16:41 ` [Bug middle-end/42577] [4.4/4.5 Regression] " rguenth at gcc dot gnu dot org 2010-01-02 16:42 ` rguenth at gcc dot gnu dot org 2010-01-02 19:15 ` rguenth at gcc dot gnu dot org 2010-01-02 19:15 ` [Bug middle-end/42577] [4.4 " rguenth at gcc dot gnu dot org 2010-01-03 19:58 ` matt at use dot net 2010-01-03 22:33 ` rguenth at gcc dot gnu dot org 2010-01-04 1:04 ` matt at use dot net 2010-01-04 14:26 ` rguenth at gcc dot gnu dot org 2010-01-17 17:39 ` rguenth at gcc dot gnu dot org 2010-01-21 13:18 ` jakub at gcc dot gnu dot org 2010-02-10 1:26 ` matt at use dot net 2010-04-30 9:01 ` jakub at gcc dot gnu dot 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=20100101224200.812.qmail@sourceware.org \ --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).