aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-split.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-09-02 13:42:25 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-09-02 13:42:25 +0000
commit6b8c9df82298ae20f04f5774c8572539159de0f3 (patch)
tree2062b2e79347ee7aef4b50126b55c744f471fe1a /gcc/ipa-split.c
parentc330d181bc98bc7efde028f7eb8ead33f69e6304 (diff)
downloadgcc-6b8c9df82298ae20f04f5774c8572539159de0f3.zip
gcc-6b8c9df82298ae20f04f5774c8572539159de0f3.tar.gz
gcc-6b8c9df82298ae20f04f5774c8572539159de0f3.tar.bz2
re PR tree-optimization/44937 (IPA-split causes crash due to null pointer deref)
2010-09-02 Richard Guenther <rguenther@suse.de> PR tree-optimization/44937 PR tree-optimization/45412 * ipa-split.c (split_function): Properly remove PHI nodes. * g++.dg/opt/pr45412.C: New testcase. * gcc.c-torture/compile/pr45412.c: Likewise. * gcc.c-torture/compile/pr44937.c: Likewise. From-SVN: r163775
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r--gcc/ipa-split.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index 712fbf5..56f689b 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -993,8 +993,8 @@ split_function (struct split_point *split_point)
{
gimple stmt = gsi_stmt (gsi);
gcc_assert (!is_gimple_reg (gimple_phi_result (stmt)));
- mark_sym_for_renaming (SSA_NAME_VAR (PHI_RESULT (stmt)));
- gsi_remove (&gsi, false);
+ mark_virtual_phi_result_for_renaming (stmt);
+ remove_phi_node (&gsi, true);
}
}
/* When we pass aorund the value, use existing return block. */