aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp86.c
blob: ee7ed5f085222adcc715037f798f8c213bdfd5d4 (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
/* PR tree-optimization/54471 */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-vrp1" } */

#ifdef __SIZEOF_INT128__
#define T __int128
#else
#define T long long
#endif

void fn1call (void);
void fn2call (void);

void
foo (unsigned T x)
{
  if (x > (unsigned T) -3)
    return;
  unsigned T y = 2 * x;
  if (y == 42)
    fn1call ();
  else
    fn2call ();
}

/* { dg-final { scan-tree-dump "fn1call" "vrp1"} } */
/* { dg-final { scan-tree-dump "fn2call" "vrp1"} } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */