public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97315] [11 Regression] ICE in choose_value, at gimple-ssa-evrp.c:282 since r11-3690-gebc77ce3a4c70730b4e38d68f88693eadbdc8712 Date: Wed, 07 Oct 2020 17:22:54 +0000 [thread overview] Message-ID: <bug-97315-4-Fih31Az3fx@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97315-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97315 --- Comment #9 from rguenther at suse dot de <rguenther at suse dot de> --- On October 7, 2020 5:35:02 PM GMT+02:00, amacleod at redhat dot com <gcc-bugzilla@gcc.gnu.org> wrote: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97315 > >--- Comment #8 from Andrew Macleod <amacleod at redhat dot com> --- >(In reply to David Binderman from comment #6) >> I get something similar with this test case: >> >> int a; >> void b() { >> if (a >= 2147483647) >> c(a + 1); >> } > >This one is slightly different. > >Still triggering in the same place, but the difference in the singleton >is the >result of the calculation of: > > [+INF, +INF] + 1 > >EVRP is reporting [-INF, -INF], and range-ops is calculating [+INF, >+INF] > >Is there a correct answer, or does it matter? While we print +inf it's just a value we can apply +1 to in the "do what I mean" sense. So I think for arithmetic we shouldn't saturate, even when overflow is undefined (instead as, you say, UNDEFINED would be the correct optimistic result). >The code we imported for handling overflow always sets the bound to >+INF if an >overflow happens, and it happens on both bounds, so we get [+INF, >+INF]. I'm >guessing because its a single value EVRP actually folded the value >regardless >of overflow? > >Or maybe it should be UNDEFINED? > >Andrew
next prev parent reply other threads:[~2020-10-07 17:22 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-07 8:34 [Bug tree-optimization/97315] New: " marxin at gcc dot gnu.org 2020-10-07 8:34 ` [Bug tree-optimization/97315] " marxin at gcc dot gnu.org 2020-10-07 10:04 ` acoplan at gcc dot gnu.org 2020-10-07 12:02 ` aldyh at gcc dot gnu.org 2020-10-07 12:13 ` aldyh at gcc dot gnu.org 2020-10-07 12:21 ` rguenth at gcc dot gnu.org 2020-10-07 12:26 ` rguenth at gcc dot gnu.org 2020-10-07 12:35 ` dcb314 at hotmail dot com 2020-10-07 15:27 ` amacleod at redhat dot com 2020-10-07 15:35 ` amacleod at redhat dot com 2020-10-07 17:22 ` rguenther at suse dot de [this message] 2020-10-07 18:07 ` amacleod at redhat dot com 2020-10-08 9:21 ` cvs-commit at gcc dot gnu.org 2020-10-08 9:36 ` cvs-commit at gcc dot gnu.org 2020-10-08 9:38 ` aldyh 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-97315-4-Fih31Az3fx@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).