]>
Commit | Line | Data |
---|---|---|
4864297f | 1 | /* { dg-do compile } */ |
3cb9e3ae | 2 | /* { dg-options "-O2 -fdump-tree-evrp -fdelete-null-pointer-checks" } */ |
1c6ebfdf | 3 | /* { dg-skip-if "" keeps_null_pointer_checks } */ |
4864297f RB |
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" } } */ |