summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/vrp35.c
blob: a372a18cc4355ea26a518476dab8ffdd0ab42a03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1-details" } */

int test1(int i, int k)
{
  if (i > 0 && i <= 5 && k >= 10 && k < 42)
    {
      int j = i + 1 + k;
      return j == 10;
    }
  return 1;
}

/* { dg-final { scan-tree-dump "Removing dead stmt \[^\r\n\]* = j_.* == 10" "vrp1" } } */