[Bug c++/60747] the tree-vrp compilation flag produce wrong assembly

techsgin at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Apr 3 14:51:00 GMT 2014


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

tech <techsgin at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |---

--- Comment #4 from tech <techsgin at gmail dot com> ---
This code is using the SAME INPUTS (hard coded) and generate 2 different
results (one positive and the other is negative) depends on the optimization
level.

It shouldn't happen even if the variable "h" will overflow.

if you take a look at the assembly you can see the the optimized code "ignore"
the negative operation.



More information about the Gcc-bugs mailing list