From: Jakub Jelinek Date: Sat, 11 Sep 2004 18:57:06 +0000 (+0200) Subject: tree-ssa-alias.c (collect_points_to_info_r): Handle pointing to PTR + OFFSET as PTR... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a17ea89bb15f7e9668860609b8953e94b69d0763;p=gcc.git tree-ssa-alias.c (collect_points_to_info_r): Handle pointing to PTR + OFFSET as PTR... * tree-ssa-alias.c (collect_points_to_info_r): Handle pointing to PTR + OFFSET as PTR, not as pointing to PTR or pointing to OFFSET. * gcc.dg/tree-ssa/20040911-1.c: New test. From-SVN: r87357 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 80d1437f056..57e38175d5e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-09-11 Jakub Jelinek + + * tree-ssa-alias.c (collect_points_to_info_r): Handle + pointing to PTR + OFFSET as PTR, not as pointing to PTR or pointing + to OFFSET. + 2004-09-11 Richard Henderson * expr.c (expand_expr_addr_expr_1) Rename from expand_expr_addr_expr. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 07cf16e8271..3727d52ce4d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-09-11 Jakub Jelinek + + * gcc.dg/tree-ssa/20040911-1.c: New test. + 2004-09-11 Andreas Jaeger * gcc.c-torture/execute/991118-1.x: Delete, PR 16437 is fixed. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040911-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040911-1.c new file mode 100644 index 00000000000..6b49570d21a --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040911-1.c @@ -0,0 +1,21 @@ +/* Verify that points-to information is handled properly for PTR + OFFSET + pointer arithmetics. */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-alias1-vops" } */ + +char buf[4], *q; +int foo (int i) +{ + char c, *p; + q = &c; + p = buf; + if (i) + p = p + 3; + else + p = p + 2; + *p = 6; + c = 8; + return *p; +} + +/* { dg-final { scan-tree-dump-not "VUSE