]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/evrp11.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / evrp11.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-evrp -fdelete-null-pointer-checks" } */
3 /* { dg-skip-if "" keeps_null_pointer_checks } */
4
5 extern void link_error ();
6
7 void foo (int *x)
8 {
9 int *p = x + 1;
10 if (p == 0)
11 link_error ();
12 }
13
14 void bar (char *x, int a)
15 {
16 if (a != 0)
17 {
18 char *p = x + a;
19 if (p == 0)
20 link_error ();
21 }
22 }
23
24 /* { dg-final { scan-tree-dump-not "link_error" "evrp" } } */