This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/30317] VRP cannot extract a range from (unsigned int) i + 0x0ffffffff > 4
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2007 22:44:39 -0000
- Subject: [Bug tree-optimization/30317] VRP cannot extract a range from (unsigned int) i + 0x0ffffffff > 4
- References: <bug-30317-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2007-01-21 22:44 -------
Created an attachment (id=12929)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12929&action=view)
patch
This is what I currently have for this - it fails to bootstrap because it
miscompares. A variant without the support for the anti-range tests
if (a < 1 || a > 5)
aka
if ((unsigned)a - 1 > 4)
bootstraps and tests ok, but the above adds useful things, so...
I guess the hunk in extract_range_from_assert may do the wrong thing
in some cases, but I didn't find a testcase for it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30317