aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr97386-2.c
blob: e61829d71abded76a16a852a25b82a44e758d103 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR rtl-optimization/97386 */

__attribute__((noipa)) unsigned
foo (int x)
{
  unsigned long long a = (0x800000000000ccccULL << x) | (0x800000000000ccccULL >> (64 - x));
  unsigned int b = a;
  return (b << 24) | (b >> 8);
}

int
main ()
{
  if (__CHAR_BIT__ == 8
      && __SIZEOF_INT__ == 4
      &&  __SIZEOF_LONG_LONG__ == 8
      && foo (1) != 0x99000199U)
    __builtin_abort ();
  return 0;
}