aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/evrp11.c
blob: 018adedf70e32649602f0817c0c4df11bbe6106c (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
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-evrp -fdelete-null-pointer-checks" } */
/* { dg-skip-if "" keeps_null_pointer_checks } */

extern void link_error ();

void foo (int *x)
{
  int *p = x + 1;
  if (p == 0)
    link_error ();
}

void bar (char *x, int a)
{
  if (a != 0)
    {
      char *p = x + a;
      if (p == 0)
	link_error ();
    }
}

/* { dg-final { scan-tree-dump-not "link_error" "evrp" } }  */