summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr69442.c
blob: ee75f92951a432f9f4706462d17251634bc4677d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* PR target/69442 */
/* { dg-do run } */
/* { dg-options "-Og" } */

unsigned long long __attribute__ ((noinline, noclone))
foo (unsigned int x, unsigned long long y)
{
  x |= 0xffff;
  y -= 0xffULL;
  y %= 0xffff0000ffffffe7ULL;
  return x + y;
}

int
main ()
{
  if (sizeof (unsigned long long) * __CHAR_BIT__ != 64)
    return 0;

  if (foo (0, 0) != 0xffff0000ff19ULL)
    __builtin_abort ();
  return 0;
}