OSDN Git Service

2011-09-29 Artjoms Sinkarovs <artyom.shinkaroff@gmail.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / 20100805-1.c
1 unsigned int foo (unsigned int a, unsigned int b)
2 {
3   unsigned i;
4   a = a & 1;
5   for (i = 0; i < b; ++i)
6     a = a << 1 | a >> (sizeof (unsigned int) * 8 - 1);
7   return a;
8 }
9 extern void abort (void);
10 int main()
11 {
12   if (foo (1, sizeof (unsigned int) * 8 + 1) != 2)
13     abort ();
14   return 0;
15 }