This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/34454] [4.3 regression] Overflow check is optimized away when -O2 is enabled
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2007 19:36:31 -0000
- Subject: [Bug middle-end/34454] [4.3 regression] Overflow check is optimized away when -O2 is enabled
- References: <bug-34454-10490@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-12-13 19:36 -------
This is not a bug, signed overflow is undefined so optimizing away this case is
correct as a positive + positive is always positive.
Use -fwarpv or what ever the strict overflow option is.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34454