public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101830] [12 Regression] Incorrect error messages beginning with r12-2591 (backward jump threader) Date: Thu, 12 Aug 2021 20:15:32 +0000 [thread overview] Message-ID: <bug-101830-4-rQbNEjhRjk@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101830-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101830 Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |FIXED --- Comment #12 from Martin Sebor <msebor at gcc dot gnu.org> --- No problem. By the way, it looks to me like safe_inc_pos() also isn't entirely safe since testing the result of the postincrement lets pos reach 1024 on function return. It should either use preincrement or 1023 as the bound. It's of course possible to issue a more nuanced warning ("may be out of bounds") for expressions that are invalid only under some condition, in basic blocks that aren't dominated by function entry. It has been suggested (and considered) a number of times before. The problem with a simplistic solution like that is that it would result in the vast majority of warnings being phrased this way, because most are in such blocks. The only certain warnings would be either in trivial functions or in the initial basic blocks. I'm working on introducing this distinction for PHIs but I don't have any ideas what to do for problems like this one.
next prev parent reply other threads:[~2021-08-12 20:15 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-09 15:54 [Bug tree-optimization/101830] New: " wschmidt at gcc dot gnu.org 2021-08-09 15:57 ` [Bug tree-optimization/101830] " wschmidt at gcc dot gnu.org 2021-08-09 17:55 ` pinskia at gcc dot gnu.org 2021-08-09 19:46 ` [Bug tree-optimization/101830] [12 Regression] " wschmidt at gcc dot gnu.org 2021-08-10 1:30 ` segher at gcc dot gnu.org 2021-08-10 12:33 ` wschmidt at gcc dot gnu.org 2021-08-12 17:35 ` msebor at gcc dot gnu.org 2021-08-12 17:47 ` wschmidt at gcc dot gnu.org 2021-08-12 17:50 ` msebor at gcc dot gnu.org 2021-08-12 18:06 ` wschmidt at gcc dot gnu.org 2021-08-12 18:44 ` wschmidt at gcc dot gnu.org 2021-08-12 19:54 ` wschmidt at gcc dot gnu.org 2021-08-12 20:15 ` msebor at gcc dot gnu.org [this message] 2021-08-12 20:39 ` wschmidt at gcc dot gnu.org 2021-08-23 21:00 ` [Bug target/101830] " cvs-commit 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-101830-4-rQbNEjhRjk@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).