This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tuples] Fix find_func_aliases
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Diego Novillo <dnovillo at google dot com>, Aldy Hernandez <aldyh at redhat dot com>, Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 4 Jul 2008 10:16:14 -0400
- Subject: [tuples] Fix find_func_aliases
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
ADDR_EXPR is GIMPLE_SINGLE_RHS, so gimple_assign_rhs1 contains the
ADDR_EXPR tree. Without this I'm getting
FAIL: gcc.c-torture/execute/20000706-4.c execution, -O2
FAIL: gcc.c-torture/execute/20000706-4.c execution, -Os
FAIL: gcc.c-torture/execute/20000706-5.c execution, -O2
FAIL: gcc.c-torture/execute/20000706-5.c execution, -Os
FAIL: gcc.c-torture/execute/20030828-1.c execution, -O1
FAIL: gcc.c-torture/execute/20040823-1.c execution, -O1
FAIL: gcc.c-torture/execute/20040823-1.c execution, -O2
FAIL: gcc.c-torture/execute/20040823-1.c execution, -Os
failures. Full bootstrap/regtesting ongoing, ok if it passes?
2008-07-04 Jakub Jelinek <jakub@redhat.com>
* tree-ssa-structalias.c (find_func_aliases): Handle ADDR_EXPR
as GIMPLE_SINGLE_RHS instead of GIMPLE_UNARY_RHS.
--- gcc/tree-ssa-structalias.c.jj 2008-07-02 19:04:29.000000000 +0200
+++ gcc/tree-ssa-structalias.c 2008-07-04 15:40:48.000000000 +0200
@@ -3783,12 +3783,12 @@ find_func_aliases (gimple origt)
gcc_assert (is_gimple_assign (t));
if (gimple_assign_rhs_code (t) == ADDR_EXPR)
{
- tree base = get_base_address (gimple_assign_rhs1 (t));
+ tree rhs = gimple_assign_rhs1 (t);
+ tree base = get_base_address (TREE_OPERAND (rhs, 0));
if (base
&& (!DECL_P (base)
|| !is_global_var (base)))
- make_escape_constraint
- (build_fold_addr_expr (gimple_assign_rhs1 (t)));
+ make_escape_constraint (rhs);
}
else if (get_gimple_rhs_class (gimple_assign_rhs_code (t))
== GIMPLE_SINGLE_RHS)
Jakub