http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48702
--- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-12 10:52:54 UTC --- (In reply to comment #12) > (In reply to comment #3) > > I have a patch that makes it fail on trunk as well. IVOPTs generates > > > > for (p = &a; p != &a - 3; --p) > > *(p + 3) = ... > > > > and alias analysis doesn't like this invalid pointer. > > > I wonder why ivopt does not select the iv candidate whose base is &a+3. I think that one is not in the list of initial candidates. I think for that sake we would want to add stripped &base + object size (+ 1?) (if we know it) as IV candidate iff iv->step is negative, iff iv->step is positive continue to add &base. I don't like the alias oracle fixups too much, but I guess we have to benchmark both alternatives.