summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr89595.c
blob: f45dc98c3f07dc59a19aa4a3863f282454a38a90 (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
33
34
35
36
37
38
39
40
41
/* { dg-do run } */
/* { dg-additional-options "-fgimple" } */

int __attribute__((noipa))
__GIMPLE(ssa,startwith("dom")) bar(int cond, int val)
{
  int i;

__BB(3):
  if (0 != 0)
    goto __BB6;
  else
    goto __BB2;

__BB(2):
  if (cond_5(D) != 0)
    goto __BB4;
  else
    goto __BB5;

__BB(4):
  i_6 = val_2(D);
  i_1 = val_2(D) > 0 ? i_6 : 0;
  goto __BB5;

__BB(5):
  i_3 = __PHI (__BB4: i_1, __BB2: 0);
  return i_3;

__BB(6):
  i_4 = 1;
  i_9 = 2;
  goto __BB2;
}

int main()
{
  if (bar (1, 1) != 1)
    __builtin_abort ();
  return 0;
}