[Bug middle-end/17894] [4.0 Regression] div/compare folding incorrect
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Oct 8 19:07:00 GMT 2004
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-08 19:07 -------
Confirmed a regression.
Caused by:
2004-05-08 Roger Sayle <roger@eyesopen.com>
* fold-const.c (fold_div_compare): New function to optimize X/C1 op C2
where op is a comparison operator and C1 and C2 are integer constants
into a range check.
(fold): Call fold_div_compare.
The problem is we are ignoring the sign of C1 which turns around the >= to be <.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2004-10-08 19:07:36
date| |
Summary|[miscompile] div/compare |[4.0 Regression] div/compare
|folding incorrect |folding incorrect
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17894
More information about the Gcc-bugs
mailing list