re PR middle-end/81659 (ICE in verify_dominators, at dominance.c:1184)
authorRichard Biener <rguenther@suse.de>
Fri, 27 Oct 2017 08:03:16 +0000 (08:03 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 27 Oct 2017 08:03:16 +0000 (08:03 +0000)
2017-10-27  Richard Biener  <rguenther@suse.de>

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
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr81659.C [new file with mode: 0644]
gcc/tree-eh.c

index e9418ee98fe1c5b5197395fa216e1c5cf8b974aa..5f33699a34bd7f9ae05bd1491695cbd6fdc12c10 100644 (file)
@@ -1,3 +1,9 @@
+2017-10-27  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/81659
+       * tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator
+       info when we redirected EH.
+
 2017-10-26  Michael Collison  <michael.collison@arm.com>
 
        * config/aarch64/aarch64.md(<optab>_trunc><vf><GPI:mode>2):
index a545b7fd7ea387e903e63aec103f9a8456736529..bafe8fda1ef26f8708c97af00f2d8a0a71420aa9 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-27  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/81659
+       * g++.dg/torture/pr81659.C: New testcase.
+
 2017-10-26  Michael Collison  <michael.collison@arm.com>
 
        * 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 (file)
index 0000000..3696957
--- /dev/null
@@ -0,0 +1,19 @@
+// { dg-do compile }
+
+void
+a (int b)
+{
+  if (b)
+    throw;
+  try
+    {
+      a (3);
+    }
+  catch (int)
+    {
+    }
+  catch (int)
+    {
+    }
+}
+
index e255e086bb54a1cba3db0a01bae8a5427fdcc9cf..1b0612b17ce795e308b059ec3bbae70033ce4cab 100644 (file)
@@ -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;
 }