aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/opt/pr46864.C26
-rw-r--r--gcc/tree-ssa-loop-im.c2
4 files changed, 38 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fb6bbc8..ed331ad 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/46864
+ * tree-ssa-loop-im.c (loop_suitable_for_sm): Return false even
+ when there are EDGE_EH exit edges.
+
2010-12-10 Tobias Burnus <burnus@net-b.de>
PR fortran/46540
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b2978f0..63a3a48 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/46864
+ * g++.dg/opt/pr46864.C: New test.
+
2010-12-10 Jack Howarth <howarth@bromo.med.uc.edu>
Iain Sandoe <iains@gcc.gnu.org>
diff --git a/gcc/testsuite/g++.dg/opt/pr46864.C b/gcc/testsuite/g++.dg/opt/pr46864.C
new file mode 100644
index 0000000..0f7b7d2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr46864.C
@@ -0,0 +1,26 @@
+// PR tree-optimization/46864
+// { dg-do compile }
+// { dg-options "-O -fnon-call-exceptions" }
+
+int baz ();
+
+struct S
+{
+ int k;
+ bool bar () throw ()
+ {
+ int m = baz ();
+ for (int i = 0; i < m; i++)
+ k = i;
+ return m;
+ }
+};
+
+extern S *s;
+
+void
+foo ()
+{
+ while (baz () && s->bar ())
+ ;
+}
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 45902e5..30faeb9 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -2369,7 +2369,7 @@ loop_suitable_for_sm (struct loop *loop ATTRIBUTE_UNUSED,
edge ex;
FOR_EACH_VEC_ELT (edge, exits, i, ex)
- if (ex->flags & EDGE_ABNORMAL)
+ if (ex->flags & (EDGE_ABNORMAL | EDGE_EH))
return false;
return true;