summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-36.c
blob: 911038391abee9ac6f40fd60a8960f5d2a3a795a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-ccp1" } */

int foo (int i, int j)
{
  int x = 1;
  int y = i + x;
  int z = y - i;
  if (z == 1)
    return 1;
  return 2;
}

/* { dg-final { scan-tree-dump "return 1;" "ccp1" } } */