diff options
author | Richard Biener <rguenther@suse.de> | 2016-10-21 07:07:06 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-10-21 07:07:06 +0000 |
commit | a20d03c88261b7d475db7c410c1018df326c67af (patch) | |
tree | dc2a148dd9df35d3f1ed9a36fe703517ace05d4c /gcc/tree-vrp.c | |
parent | 924fae46b341e810ec5f1fa0e99b5f0cadeff7eb (diff) | |
download | gcc-a20d03c88261b7d475db7c410c1018df326c67af.zip gcc-a20d03c88261b7d475db7c410c1018df326c67af.tar.gz gcc-a20d03c88261b7d475db7c410c1018df326c67af.tar.bz2 |
re PR c++/78051 (error: dead STMT in EH table when using -O2)
2016-10-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/78051
* tree-vrp.c (evrp_dom_walker::before_dom_children): Update stmt
and mark replaced if folding did something.
* g++.dg/torture/pr78051.C: New testcase.
From-SVN: r241394
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index c1750d0..9675ca2 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -10850,7 +10850,11 @@ evrp_dom_walker::before_dom_children (basic_block bb) = replace_uses_in (stmt, op_with_constant_singleton_value_range); if (fold_stmt (&gsi, follow_single_use_edges) || did_replace) - update_stmt (gsi_stmt (gsi)); + { + stmt = gsi_stmt (gsi); + update_stmt (stmt); + did_replace = true; + } if (did_replace) { |