Commit 823f0809 by Diego Novillo Committed by Diego Novillo

re PR tree-optimization/17319 (-fno-tree-dce cause ICE)


	PR tree-optimization/17319
	* tree-ssa-alias.c (compute_points_to_and_addr_escape): Also
	examine pointers on the LHS of an assignment.
	(collect_points_to_info_r): Handle RETURN_EXPR.

testsuite/ChangeLog

	PR tree-optimization/17319
	* gcc.dg/pr17319.c: New test.

From-SVN: r87673
parent b5fefcf6
2004-09-17 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/17319
* tree-ssa-alias.c (compute_points_to_and_addr_escape): Also
examine pointers on the LHS of an assignment.
(collect_points_to_info_r): Handle RETURN_EXPR.
2004-09-17 Jeff Law <law@redhat.com>
* tree-ssa-dom.c (const_and_copies_stack): New.
......
2004-09-17 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/17319
* gcc.dg/pr17319.c: New test.
2004-09-17 Devang Patel <dpatel@apple.com>
* gcc.dg/20040813-1.c: New test.
......
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-dce" } */
typedef unsigned long long HARD_REG_ELT_TYPE;
typedef HARD_REG_ELT_TYPE HARD_REG_SET[2];
static HARD_REG_SET newpat_used_regs;
int try_combine (void)
{
HARD_REG_ELT_TYPE *scan_tp_ = newpat_used_regs;
scan_tp_[0] = 0;
scan_tp_[1] = 0;
}
......@@ -694,6 +694,9 @@ compute_points_to_and_addr_escape (struct alias_info *ai)
bitmap_set_bit (ai->written_vars, ann->uid);
if (may_be_aliased (var))
(VARRAY_UINT (ai->num_references, ann->uid))++;
if (POINTER_TYPE_P (TREE_TYPE (op)))
collect_points_to_info_for (ai, op);
}
/* Mark variables in V_MAY_DEF operands as being written to. */
......@@ -1831,6 +1834,12 @@ collect_points_to_info_r (tree var, tree stmt, void *data)
switch (TREE_CODE (stmt))
{
case RETURN_EXPR:
if (TREE_CODE (TREE_OPERAND (stmt, 0)) != MODIFY_EXPR)
abort ();
stmt = TREE_OPERAND (stmt, 0);
/* FALLTHRU */
case MODIFY_EXPR:
{
tree rhs = TREE_OPERAND (stmt, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment