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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-03-12
          Component|c                           |tree-optimization
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-12 
13:22:32 UTC ---
It certainly inlines the function, does not figures out the loop does not run
and then computes n's value-range as is [0, +INF(OVF)] and thus when
simplifying
the return value comparison against -1 it says it assumes that n++ does not
wrap.

Looks ok to me, though it is all because of dead code and thus a missed
VRP of some sort.

Reply via email to