------- Comment #2 from rguenth at gcc dot gnu dot org  2005-12-01 10:53 -------
Confirmed.  The first testcase is really just

short *a;
void f(void)
{
  *a = *a << 1;
}

interestingly, the C frontend does not do integer promotion of

unsigned short *a;
void f(voif)
{
  *a = *a << 1;
}

where *a should be promoted to int as of 6.3.1.8 and 6.5.7/3, which
says "Integer promotions are performed on each of the operands".  Now
the question is how to read this, but either the C frontend does
unnecessary promution for the signed case or it misses it for the unsigned
case.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-01 10:53:06
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25186

Reply via email to