blob: 93385ecae56c3ec85ae27f4ef27f065597a0a265 [file] [log] [blame]
/* This used to fail as we would convert f into just return (unsigned int)usVlanID
which is wrong. */
int f(unsigned short usVlanID) __attribute__((noinline,noclone));
int f(unsigned short usVlanID)
{
unsigned int uiVlanID = 0xffffffff;
int i;
if ((unsigned short)0xffff != usVlanID)
uiVlanID = (unsigned int)usVlanID;
return uiVlanID;
}
int main(void)
{
if (f(1) != 1)
__builtin_abort ();
if (f(0xffff) != -1)
__builtin_abort ();
return 0;
}