From 830717d0a3ae6e19b8d783f9f3481945772e29dc Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 27 Oct 2017 08:03:16 +0000 Subject: [PATCH] re PR middle-end/81659 (ICE in verify_dominators, at dominance.c:1184) 2017-10-27 Richard Biener PR middle-end/81659 * tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator info when we redirected EH. * g++.dg/torture/pr81659.C: New testcase. From-SVN: r254136 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/torture/pr81659.C | 19 +++++++++++++++++++ gcc/tree-eh.c | 5 ++++- 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/torture/pr81659.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e9418ee98fe..5f33699a34b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-10-27 Richard Biener + + PR middle-end/81659 + * tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator + info when we redirected EH. + 2017-10-26 Michael Collison * config/aarch64/aarch64.md(_trunc>2): diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a545b7fd7ea..bafe8fda1ef 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-27 Richard Biener + + PR middle-end/81659 + * g++.dg/torture/pr81659.C: New testcase. + 2017-10-26 Michael Collison * gcc.target/aarch64/fix_trunc1.c: New testcase. diff --git a/gcc/testsuite/g++.dg/torture/pr81659.C b/gcc/testsuite/g++.dg/torture/pr81659.C new file mode 100644 index 00000000000..3696957532e --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr81659.C @@ -0,0 +1,19 @@ +// { dg-do compile } + +void +a (int b) +{ + if (b) + throw; + try + { + a (3); + } + catch (int) + { + } + catch (int) + { + } +} + diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index e255e086bb5..1b0612b17ce 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -3779,7 +3779,10 @@ pass_lower_eh_dispatch::execute (function *fun) } if (redirected) - delete_unreachable_blocks (); + { + free_dominance_info (CDI_DOMINATORS); + delete_unreachable_blocks (); + } return flags; } -- 2.30.2