aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/evrp30.c
blob: 2c5ff41ecd9403597e654799095cb7b4d1b47381 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Confirm the ranger is picking up a relationship with equivalences.  */
/* { dg-do compile } */
/* { dg-options "-O2  -fdump-tree-evrp" } */

extern void foo ();

void f (unsigned int a, unsigned int b)
{
  if (a == b)
    for (unsigned i = 0; i < a; i++)
      if (i == b)   // Confirm  i < a also means i < b.
	foo (); /* Unreachable */
}

/* { dg-final { scan-tree-dump-times "foo\\(" 0 "evrp"} } */