summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/20040210-1.c
blob: 9eb7905aef0737fd9ba9ff8273183852d8de28bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-phiopt1-details" } */
 

void abort(void);
void exit(int);

int x, y;

static void
init_xy(void)
{
  x = 3;
  y = 2;
}

void
test4(void)
{
  init_xy();
  if ((x < y ? x++ : y++) != 2)
    abort ();
}

int
main(){
  test4 ();
  exit (0);
}

/* Should have no more than two ifs left after straightening.  */
/* { dg-final { scan-tree-dump-times "if " 2 "phiopt1"} } */