summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/20100805-1.c
blob: 5b476960ed7beef2644a33d5d35bd7479e035395 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
unsigned int foo (unsigned int a, unsigned int b)
{
  unsigned i;
  a = a & 1;
  for (i = 0; i < b; ++i)
    a = a << 1 | a >> (sizeof (unsigned int) * 8 - 1);
  return a;
}
extern void abort (void);
int main()
{
  if (foo (1, sizeof (unsigned int) * 8 + 1) != 2)
    abort ();
  return 0;
}