blob: 3e35249dadded645a213bcf5a3b948123cefee93 [file] [log] [blame]
/* PR optimization/8746 */
/* { dg-do run { target i?86-*-* } } */
/* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
/* { dg-options "-O1 -mtune=i586" } */
extern void abort (void);
unsigned short r0;
int foo(int x)
{
unsigned short r = x&0xf000;
if (!(r&0x8000))
{
r0 = r;
return 0;
}
else
return 1;
}
int main(void)
{
if (foo(0x8000) != 1)
abort();
return 0;
}