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/22348] [4.0/4.1 Regression] IV canonicalization causes execution of loops past their end condition


------- Additional Comments From rakdver at gcc dot gnu dot org  2005-07-15 10:09 -------
extract_muldiv(51 - 7, 3, FLOOR_MOD_EXPR) returns incorrectly 0.

The reason is that 51 - 7 is replaced with 51 + ~6, and both 51 and ~6 are
divisible by 3, so the result obviously is 0 :-) Someone forgot about overflows.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22348


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