This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48793] Optimization -O2 Incorrectly Removes Logic
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 27 Apr 2011 23:01:08 +0000
- Subject: [Bug c/48793] Optimization -O2 Incorrectly Removes Logic
- Auto-submitted: auto-generated
- References: <bug-48793-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48793
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-04-27 22:59:51 UTC ---
(In reply to comment #2)
> myInteger = -myInteger;
>
> is undefined for the integer MIN_INT?
The above is undefined for the value of MIN_INT. As there is an overflow as
-MIN_INT is not representable in the type int.