aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr103808.c
blob: 51fc460a900873ed5a59e80668f04f0b4ae20451 (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 debug/103808 */
/* { dg-do compile { target int128 } } */
/* { dg-options "-fcompare-debug -O2 -ftrapv" } */

void
foo (__int128 x, int y)
{
  for (;;)
    {
      __int128 a, b;

      x |= !!y;
      a = x + 1;
      b = y ? ++y : ++x;
      y = a < b;
      asm ("" : "+r" (y));
      if (x >> 2)
        y *= 2;

      if (y == b)
        __builtin_unreachable ();
    }
}