From: Martin Liska Date: Thu, 14 Feb 2019 11:30:58 +0000 (+0100) Subject: Call free_dominance_info when transformed in DCE (PR rtl-optimization/89242). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=696c5b27c524cf65c6b06e93e62f047faad40a78;p=gcc.git Call free_dominance_info when transformed in DCE (PR rtl-optimization/89242). 2019-02-14 Martin Liska PR rtl-optimization/89242 * dce.c (delete_unmarked_insns): Call free_dominance_info we process a transformation. 2019-02-14 Martin Liska PR rtl-optimization/89242 * g++.dg/pr89242.C: New test. From-SVN: r268873 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c800ee18da3..fd554df1471 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-02-14 Martin Liska + + PR rtl-optimization/89242 + * dce.c (delete_unmarked_insns): Call free_dominance_info we + process a transformation. + 2019-02-14 Jakub Jelinek PR tree-optimization/89314 diff --git a/gcc/dce.c b/gcc/dce.c index cb18e81592a..8fb109c7388 100644 --- a/gcc/dce.c +++ b/gcc/dce.c @@ -652,6 +652,7 @@ delete_unmarked_insns (void) { gcc_assert (can_alter_cfg); delete_unreachable_blocks (); + free_dominance_info (CDI_DOMINATORS); } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7c2b71bb010..def998a14ee 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-02-14 Martin Liska + + PR rtl-optimization/89242 + * g++.dg/pr89242.C: New test. + 2019-02-14 Jakub Jelinek PR tree-optimization/89314 diff --git a/gcc/testsuite/g++.dg/pr89242.C b/gcc/testsuite/g++.dg/pr89242.C new file mode 100644 index 00000000000..a702fef4f31 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr89242.C @@ -0,0 +1,15 @@ +// { dg-do compile } +// { dg-options "-fno-rerun-cse-after-loop -ftrapv -fno-tree-loop-optimize -fdelete-dead-exceptions -fno-forward-propagate -fnon-call-exceptions -O2" } + +void bar (int n, char *p) +{ + try + { + n++; + for (int i = 0; i < n - 1; i++) + p[i]; + } + catch (...) + {} +} +