This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/56488] [4.7 Regression] wrong code for loop at -O3
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 01 Mar 2013 09:59:39 +0000
- Subject: [Bug tree-optimization/56488] [4.7 Regression] wrong code for loop at -O3
- Auto-submitted: auto-generated
- References: <bug-56488-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56488
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-01 09:59:39 UTC ---
But e = e + 5 is avaluated as
e = (short) ((int) e + 5)
and thus I think it just falls down to implementation defined behavior
(assuming short is smaller than int of course), because no overflow happens in
the int type in which the addition is computed, and there is just cast of a
larger int value to smaller short type.