[Bug middle-end/25186] (short)(((int)short_var) <<1) should be done in short
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Nov 30 18:32:00 GMT 2005
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-30 18:32 -------
It also should be done for:
int f1(void)
{
*a = (short)(((int)(unsigned short)*a) << 1);
}
Which is a little more complicated on the tree level than the RTL level:
tree level:
*a.1 = (short int) ((int) (short unsigned int) *a.1 << 1);
RTL level just has a zero_extend.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25186
More information about the Gcc-bugs
mailing list