From: Andreas Krebbel Date: Wed, 14 May 2008 06:51:30 +0000 (+0000) Subject: cse.c (cse_cc_succs): Invoke delete_insn_and_edges. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0beb3d66eabd1090b50ac68e1741756db72f595a;p=gcc.git cse.c (cse_cc_succs): Invoke delete_insn_and_edges. 2008-05-14 Andreas Krebbel * cse.c (cse_cc_succs): Invoke delete_insn_and_edges. 2008-05-14 Andreas Krebbel * g++.dg/eh/080513-1.C: New testcase. From-SVN: r135281 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17a46138693..d5b6672174f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2008-05-14 Andreas Krebbel + + * cse.c (cse_cc_succs): Invoke delete_insn_and_edges. + 2008-05-13 Uros Bizjak PR target/36222 diff --git a/gcc/cse.c b/gcc/cse.c index 23b61349455..a5efcd713bc 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -6861,7 +6861,7 @@ cse_cc_succs (basic_block bb, rtx cc_reg, rtx cc_src, bool can_change_mode) newreg); } - delete_insn (insns[i]); + delete_insn_and_edges (insns[i]); } return mode; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 699c4169f38..ff7b73d74df 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-05-14 Andreas Krebbel + + * g++.dg/eh/080513-1.C: New testcase. + 2008-05-13 Uros Bizjak PR target/36222 diff --git a/gcc/testsuite/g++.dg/eh/080514-1.C b/gcc/testsuite/g++.dg/eh/080514-1.C new file mode 100644 index 00000000000..dafa32503c5 --- /dev/null +++ b/gcc/testsuite/g++.dg/eh/080514-1.C @@ -0,0 +1,16 @@ +// This used to fail on s390 due to cse removing an insn with a +// REG_EH_REGION without deleting the EH edge. +// { dg-do compile } +// { dg-options "-O2 -fnon-call-exceptions" } + +void +run (int m, double d) +{ + int stack[m]; + int *sp = stack; + + if (d == 1.0) + *(sp++) = (0); + else if (d < 1.0) + *(sp++) = (-1); +}