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/52560] if (r == -1) causes 'assuming signed overflow does not occur when simplifying conditional to constant'


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.


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