This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch tree-ssa-structalias.c]: Small finding in find_func_aliases function
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 5 Apr 2013 10:29:23 +0200
- Subject: [patch tree-ssa-structalias.c]: Small finding in find_func_aliases function
Hello,
while debugging I made the finding that in find_func_aliases rhsop
might be used as NULL for gimple_assign_single_p items. It should be
using for the gimple_assign_single_p instead directly the rhs1-item as
argument to pass to get_constraint_for_rhs function.
ChangeLog
2013-04-05 Kai Tietz
* tree-ssa-structalias.c (find_func_aliases): Special-case
gimple_assign_single_p handling.
Ok for apply?
Regards,
Kai
Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c (Revision 197495)
+++ tree-ssa-structalias.c (Arbeitskopie)
@@ -4667,9 +4667,10 @@ find_func_aliases (gimple origt)
}
else if ((CONVERT_EXPR_CODE_P (code)
&& !(POINTER_TYPE_P (gimple_expr_type (t))
- && !POINTER_TYPE_P (TREE_TYPE (rhsop))))
- || gimple_assign_single_p (t))
+ && !POINTER_TYPE_P (TREE_TYPE (rhsop)))))
get_constraint_for_rhs (rhsop, &rhsc);
+ else if (gimple_assign_single_p (t))
+ get_constraint_for_rhs (gimple_assign_rhs1 (t), &rhsc);
else if (code == COND_EXPR)
{
/* The result is a merge of both COND_EXPR arms. */