[Bug tree-optimization/26939] loop number of iterations analysis not working

rakdver at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Feb 12 19:59:00 GMT 2009



------- Comment #18 from rakdver at gcc dot gnu dot org  2009-02-12 19:58 -------
> It "works" once you change the loop exit condition to i < i1.  Same effects
> with unsigned variables (adjust the lower bound to sth like 2 to avoid ill
> effects).

There is nothing to fix if unsigned variables are used, as the inner loop may
be infinite in that case.  For the signed case, we can use the fact that i
cannot wrap (with flag_strict_overflow), but there are some complications (see
PR25985).


-- 


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



More information about the Gcc-bugs mailing list