Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.dg / 20050922-2.c
blobc2974d03d9c8b4a0575f735cedc77105ede370f6
1 /* 20050922-1.c does not trigger the expand_shift rotate bug on sh4-elf, but
2 this does. */
4 /* { dg-do run } */
5 /* { dg-options "-O1 -std=c99" } */
7 #include <stdlib.h>
9 #if __INT_MAX__ == 2147483647
10 typedef unsigned int uint32_t;
11 #elif __LONG_MAX__ == 2147483647
12 typedef unsigned long uint32_t;
13 #else
14 #error unable to find 32-bit integer type
15 #endif
17 #define rotl(x,n) (((x) << ((int)(n))) | ((x) >> (32 - (int)(n))))
19 uint32_t
20 f (uint32_t a, uint32_t b)
23 b = rotl (a, b & 31);
24 return b;
27 int
28 main ()
30 if (f(2,31) != 1)
31 abort ();
32 exit (0);