summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-propagate.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-09-21 09:52:00 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-09-21 09:52:00 +0000
commitce2b1d68a387994dab9de5e862c809be3d39326c (patch)
treee56f74dda4e97878bf4598aa4d45f83c158b7fba /gcc/tree-ssa-propagate.c
parent1c7f2bc8dd0e41fe8863b1f2706aea7ccf8b8528 (diff)
downloadgcc-ce2b1d68a387994dab9de5e862c809be3d39326c.tar.gz
re PR tree-optimization/45580 (Building WebKit fails with compiler catching SIGSEGV in gimple_fold_obj_type_ref_known_binfo())
2010-09-21 Richard Guenther <rguenther@suse.de> PR tree-optimization/45580 * tree-ssa-propagate.c (substitute_and_fold): Always replace regular uses. * gimple-fold.c (gimple_fold_obj_type_ref): For a BINFO without virtuals fold the call into a regular indirect one. * g++.dg/torture/pr45580.C: New testcase. From-SVN: r164474
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r--gcc/tree-ssa-propagate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index e08d2e7ae0c..c97960cfdf7 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -1122,12 +1122,12 @@ substitute_and_fold (ssa_prop_get_value_fn get_value_fn,
{
did_replace = true;
prop_stats.num_stmts_folded++;
+ stmt = gsi_stmt (oldi);
+ update_stmt (stmt);
}
- /* Only replace real uses if we couldn't fold the
- statement using value range information. */
- if (get_value_fn
- && !did_replace)
+ /* Replace real uses in the statement. */
+ if (get_value_fn)
did_replace |= replace_uses_in (stmt, get_value_fn);
/* If we made a replacement, fold the statement. */