This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/30317] VRP cannot extract a range from (unsigned int) i + 0x0ffffffff > 4



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]