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

int x, y;

__attribute__((noipa)) int
foo (int z)
{
  if (__builtin_expect (x ? y != 0 : 0, z++))
    return 7;
  return z;
}

int
main ()
{
  x = 1;
  asm volatile ("" : "+m" (x), "+m" (y));
  if (foo (10) != 11)
    __builtin_abort ();
  return 0;
}