Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / pr108385.c
blob13babf06d9a479a749536b82d701a4333b12718d
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-evrp" } */
4 void bar(char *);
6 /* Ensure that PTR1 = PTR2 + OFF properly picks up the zero and non-zero
7 properties if PTR1 and PTR2 are known equal or non-equal. */
9 void foo1 (char *p, char *pp, int off)
11 char *q = p + off;
12 if (q != p)
14 if (off == 0)
15 bar (q);
17 else
19 if (off != 0)
20 bar (p);
24 void foo2 (char *p, char *pp, int off)
26 char *q = p + off;
27 if (q == p)
29 if (off != 0)
30 bar (p);
32 else
34 if (off == 0)
35 bar (q);
39 /* { dg-final { scan-tree-dump-not "bar" "evrp" } } */