aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr93744-2.c
blob: 0c1baaac77b3e10af52fdc4165d89a14c7f8900d (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/93744 */

int w;

int
foo (int x, int y, int z)
{
  int r = z - ((z - w++) & -(x < y));
  return r;
}

int
main ()
{
  w = 4;
  if (foo (5, 7, 12) != 4 || w != 5)
    __builtin_abort ();
  if (foo (7, 5, 12) != 12 || w != 6)
    __builtin_abort ();
  return 0;
}