This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/16790] [3.3/3.4/3.5 regression] Integer down cast ignored in larger expression
- 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: 27 Jul 2004 23:39:34 -0000
- Subject: [Bug middle-end/16790] [3.3/3.4/3.5 regression] Integer down cast ignored in larger expression
- References: <20040727223545.16790.andyb@mathworks.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-27 23:39 -------
To say what happens is this (u1 * 2 is the same as u1 << 1:
(((int) (signed short)(u1 * 2)) * 3)
is being changed by fold (or in the C front-end) into
u1 * 6
most likely because there is a STRIP_NOP or (int)(short)(int_variable) is being changed into int_variable.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |gdr at gcc dot gnu dot org
Component|c |middle-end
Keywords| |wrong-code
Target Milestone|3.3.5 |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16790