summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-23 20:37:37 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-23 20:37:37 +0000
commitf4ea772b296affa49fb655a8b8e4fb0345d2b192 (patch)
treefb9a2e7eb731c6fd8366287fc8de648d785d068a /gcc
parent9438b04d8cf94e225e12fb96469f3ad1da75046a (diff)
downloadgcc-f4ea772b296affa49fb655a8b8e4fb0345d2b192.tar.gz
PR tree-optimization/54669
* tree-ssa-loop-ivcanon.c (propagate_into_all_uses): Invoke maybe_clean_or_replace_eh_stmt on the modified use statements. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191654 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/pr54669.c22
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c1
4 files changed, 34 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9aa6e8e5079..9602625ace4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR tree-optimization/54669
+ * tree-ssa-loop-ivcanon.c (propagate_into_all_uses): Invoke
+ maybe_clean_or_replace_eh_stmt on the modified use statements.
+
2012-09-23 Marc Glisse <marc.glisse@inria.fr>
* expr.c (do_store_flag): Remove duplicated code.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c7d950d7cff..a677859668a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,10 +1,14 @@
+2012-09-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr54669.c: New test.
+
2012-09-23 Paolo Carlini <paolo.carlini@oracle.com>
Dominique Dhumieres <dominiq@lps.ens.fr>
PR testsuite/54677
* g++.dg/cpp0x/decltype32.C: Add -ftemplate-depth=10.
-2012-09-2323 Tobias Burnus <burnus@net-b.de>
+2012-09-23 Tobias Burnus <burnus@net-b.de>
PR fortran/54618
* gfortran.dg/class_array_14.f90: New.
diff --git a/gcc/testsuite/gcc.dg/pr54669.c b/gcc/testsuite/gcc.dg/pr54669.c
new file mode 100644
index 00000000000..3868ae691da
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54669.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/54669 */
+/* Testcase by Zdenek Sojka <zsojka@seznam.cz> */
+
+/* { dg-compile } */
+/* { dg-options "-O2 -fexceptions -fnon-call-exceptions" } */
+
+int a[10];
+
+void
+foo (void)
+{
+ int x;
+ int i;
+ for (i = 0; i < 1;)
+ {
+ int b[3];
+ for (i = 0; i < 1; i++)
+ b[i] = a[i];
+ if (&x)
+ a[0] = b[0];
+ }
+}
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 1e44dd4c735..b790e1f43cc 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -531,6 +531,7 @@ propagate_into_all_uses (tree ssa_name, tree val)
fold_stmt_inplace (&use_stmt_gsi);
update_stmt (use_stmt);
+ maybe_clean_or_replace_eh_stmt (use_stmt, use_stmt);
}
}