aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-pre.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-10-04 11:48:21 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-10-04 11:48:21 +0000
commit678771ad9cf341b31f3a7717eefb868cac2221ec (patch)
treedd9d76cd0e700400bbb123ca0bf30bce743ece75 /gcc/tree-ssa-pre.c
parent5c1eb617e427a417dd7e1f79eee15b38362dbf53 (diff)
downloadgcc-678771ad9cf341b31f3a7717eefb868cac2221ec.zip
gcc-678771ad9cf341b31f3a7717eefb868cac2221ec.tar.gz
gcc-678771ad9cf341b31f3a7717eefb868cac2221ec.tar.bz2
re PR tree-optimization/54735 (Segmentation fault in walk_aliased_vdefs_1)
2012-10-04 Richard Guenther <rguenther@suse.de> PR middle-end/54735 * tree-ssa-pre.c (do_pre): Make sure to update virtual SSA form before cleaning up the CFG. * g++.dg/torture/pr54735.C: New testcase. From-SVN: r192078
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r--gcc/tree-ssa-pre.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 86c33d3..8dbbed2 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -4820,6 +4820,13 @@ do_pre (void)
free_scc_vn ();
+ /* Tail merging invalidates the virtual SSA web, together with
+ cfg-cleanup opportunities exposed by PRE this will wreck the
+ SSA updating machinery. So make sure to run update-ssa
+ manually, before eventually scheduling cfg-cleanup as part of
+ the todo. */
+ update_ssa (TODO_update_ssa_only_virtuals);
+
return todo;
}
@@ -4845,8 +4852,7 @@ struct gimple_opt_pass pass_pre =
0, /* properties_provided */
0, /* properties_destroyed */
TODO_rebuild_alias, /* todo_flags_start */
- TODO_update_ssa_only_virtuals | TODO_ggc_collect
- | TODO_verify_ssa /* todo_flags_finish */
+ TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
}
};