diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-16 08:38:12 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-16 08:38:12 +0000 |
commit | ae8f99a0698438d7fd5bf2185681217b9a6dd3fa (patch) | |
tree | 412a37aa0ba1c39527195a54f776e214e33b9b6e /gcc/tree-ssa-propagate.c | |
parent | 57aa93edcc3108b4df95126254a1f3b77e49e648 (diff) | |
download | gcc-ae8f99a0698438d7fd5bf2185681217b9a6dd3fa.tar.gz |
2008-05-16 Richard Guenther <rguenther@suse.de>
* tree-ssa-propagate.c (substitute_and_fold): Fix stmt walking
on deletion of the last stmt.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135412 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r-- | gcc/tree-ssa-propagate.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index 1b40bf095ed..728a709c64c 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -1250,6 +1250,7 @@ substitute_and_fold (prop_value_t *prop_value, bool use_ranges_p) && (!(call = get_call_expr_in (stmt)) || !TREE_SIDE_EFFECTS (call))) { + block_stmt_iterator i2; if (dump_file && dump_flags & TDF_DETAILS) { fprintf (dump_file, "Removing dead stmt "); @@ -1257,10 +1258,10 @@ substitute_and_fold (prop_value_t *prop_value, bool use_ranges_p) fprintf (dump_file, "\n"); } prop_stats.num_dce++; - bsi_remove (&i, true); + bsi_prev (&i); + i2 = bsi_for_stmt (stmt); + bsi_remove (&i2, true); release_defs (stmt); - if (!bsi_end_p (i)) - bsi_prev (&i); continue; } |