Commit fcfa87ac by Richard Biener Committed by Richard Biener

re PR tree-optimization/56150 (ICE segfault in do_pre / tail_merge_optimize)

2013-01-31  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/56150
	* tree-ssa-tail-merge.c (gimple_equal_p): Properly handle
	mixed store non-store stmts.

	* gcc.dg/torture/pr56150.c: New testcase.

From-SVN: r195608
parent b7138297
2013-01-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/56150
* tree-ssa-tail-merge.c (gimple_equal_p): Properly handle
mixed store non-store stmts.
2013-01-30 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/55374
......
2013-01-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/56150
* gcc.dg/torture/pr56150.c: New testcase.
2013-01-30 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/55374
......
/* { dg-do compile } */
struct {
int f4;
} g1;
long g2;
volatile long g3;
void func_1 ()
{
if (g2)
g1 = g1;
else
g3;
}
......@@ -1119,17 +1119,14 @@ gimple_equal_p (same_succ same_succ, gimple s1, gimple s2)
case GIMPLE_ASSIGN:
lhs1 = gimple_get_lhs (s1);
lhs2 = gimple_get_lhs (s2);
if (gimple_vdef (s1))
{
if (vn_valueize (gimple_vdef (s1)) != vn_valueize (gimple_vdef (s2)))
return false;
if (TREE_CODE (lhs1) != SSA_NAME
&& TREE_CODE (lhs2) != SSA_NAME)
return true;
}
return (TREE_CODE (lhs1) == SSA_NAME
&& TREE_CODE (lhs2) == SSA_NAME
&& vn_valueize (lhs1) == vn_valueize (lhs2));
if (TREE_CODE (lhs1) != SSA_NAME
&& TREE_CODE (lhs2) != SSA_NAME)
return (vn_valueize (gimple_vdef (s1))
== vn_valueize (gimple_vdef (s2)));
else if (TREE_CODE (lhs1) == SSA_NAME
&& TREE_CODE (lhs2) == SSA_NAME)
return vn_valueize (lhs1) == vn_valueize (lhs2);
return false;
case GIMPLE_COND:
t1 = gimple_cond_lhs (s1);
......
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