From 42e52a51c4d34c11b2400137f196076ba6eda9b4 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 15 Oct 2014 15:05:20 +0000 Subject: [PATCH] gimple-fold.c (gimple_fold_call): Properly keep virtual SSA form up-to-date when... 2014-10-15 Richard Biener * gimple-fold.c (gimple_fold_call): Properly keep virtual SSA form up-to-date when devirtualizing a call to __builtin_unreachable and avoid fixing up EH info here. From-SVN: r216266 --- gcc/ChangeLog | 6 ++++++ gcc/gimple-fold.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index efbbe411fd7..89a84a21812 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-10-15 Richard Biener + + * gimple-fold.c (gimple_fold_call): Properly keep virtual + SSA form up-to-date when devirtualizing a call to + __builtin_unreachable and avoid fixing up EH info here. + 2014-10-15 Alexander Ivchenko Maxim Kuznetsov Anna Tikhonova diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index a0ce0db9766..cc27cb95c5f 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -2629,7 +2629,11 @@ gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace) gsi_insert_before (gsi, new_stmt, GSI_NEW_STMT); } else - gsi_replace (gsi, new_stmt, true); + { + gimple_set_vuse (new_stmt, gimple_vuse (stmt)); + gimple_set_vdef (new_stmt, gimple_vdef (stmt)); + gsi_replace (gsi, new_stmt, false); + } return true; } } -- 2.30.2