diff options
author | Richard Guenther <rguenther@suse.de> | 2010-09-21 09:52:00 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-09-21 09:52:00 +0000 |
commit | ce2b1d68a387994dab9de5e862c809be3d39326c (patch) | |
tree | e56f74dda4e97878bf4598aa4d45f83c158b7fba /gcc/tree-ssa-propagate.c | |
parent | 1c7f2bc8dd0e41fe8863b1f2706aea7ccf8b8528 (diff) | |
download | gcc-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.c | 8 |
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. */ |