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/26358] -ftree-vrp generates invalid code with this loop that overflows integer multiplication



------- 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


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