This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/26358] -ftree-vrp generates invalid code with this loop that overflows integer multiplication
- 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: 19 Feb 2006 02:08:19 -0000
- Subject: [Bug tree-optimization/26358] -ftree-vrp generates invalid code with this loop that overflows integer multiplication
- References: <bug-26358-12218@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 2006-02-19 02:08 -------
This is not a bug in GCC. This is undefined code because of signed overflow.
i * i will always be greater than zero if i is also greater than zero with
signed types unless you use -fwrapv which causes overflow to be defined.
This is not a bug.
--
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=26358