This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/86768] gcc wrongly decides that variable is <=1 after "while (x>1 && blah)" construct.
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 01 Aug 2018 08:05:25 +0000
- Subject: [Bug c/86768] gcc wrongly decides that variable is <=1 after "while (x>1 && blah)" construct.
- Auto-submitted: auto-generated
- References: <bug-86768-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86768
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |NEW
Last reconfirmed| |2018-08-01
CC| |rguenth at gcc dot gnu.org
Resolution|INVALID |---
Ever confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Well, it is unfortunate that VRP performs threading to isolate a never executed
case. That's similar to array-bound warnings emitted by VRP2 which we
disabled because of unrolling exposing them.
Yes, theoretically you didn't constrain inputs locally but you may very
well have in all callers. GCC isn't supposed to warn here.
Better move those warnings earlier like we ended up doing for -Warray-bounds.
They are currently emitted by RTL expansion, correct?