* gcc.c-torture/execute/20101011-1.c: Skip on SH.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20050111-1.c
blobd6089f1bd8de43e4c143c30cf3df6a7d966149f1
1 /* PR middle-end/19084, rtl-optimization/19348 */
3 unsigned int
4 foo (unsigned long long x)
6 unsigned int u;
8 if (x == 0)
9 return 0;
10 u = (unsigned int) (x >> 32);
11 return u;
14 unsigned long long
15 bar (unsigned short x)
17 return (unsigned long long) x << 32;
20 extern void abort (void);
22 int
23 main (void)
25 if (sizeof (long long) != 8)
26 return 0;
28 if (foo (0) != 0)
29 abort ();
30 if (foo (0xffffffffULL) != 0)
31 abort ();
32 if (foo (0x25ff00ff00ULL) != 0x25)
33 abort ();
34 if (bar (0) != 0)
35 abort ();
36 if (bar (0x25) != 0x2500000000ULL)
37 abort ();
38 return 0;