PR tree-optimization/54669
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 23 Sep 2012 20:37:37 +0000 (20:37 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 23 Sep 2012 20:37:37 +0000 (20:37 +0000)
* 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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr54669.c [new file with mode: 0644]
gcc/tree-ssa-loop-ivcanon.c

index 9aa6e8e..9602625 100644 (file)
@@ -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.
index c7d950d..a677859 100644 (file)
@@ -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 (file)
index 0000000..3868ae6
--- /dev/null
@@ -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];
+    }
+}
index 1e44dd4..b790e1f 100644 (file)
@@ -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);
     }
 }