OSDN Git Service

PR 23164
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Aug 2005 19:12:52 +0000 (19:12 +0000)
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Aug 2005 19:12:52 +0000 (19:12 +0000)
* tree-cfgcleanup.c (cleanup_tree_cfg): Do not limit the
number of calls to cleanup_tree_cfg_1.

testsuite/ChangeLog

PR 23164
* g++.dg/tree-ssa/pr23164.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102666 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/pr23164.C [new file with mode: 0644]
gcc/tree-cfgcleanup.c

index c4665db..a323b8f 100644 (file)
@@ -1,3 +1,9 @@
+2005-08-02  Diego Novillo  <dnovillo@redhat.com>
+
+       PR 23164
+       * tree-cfgcleanup.c (cleanup_tree_cfg): Do not limit the
+       number of calls to cleanup_tree_cfg_1.
+
 2005-08-02  Martin Reinecke  <martin@mpa-garching.mpg.de>
 
        * doc/invoke.texi: document file extensions .F90 and .F95
index 2ec8fdb..595becb 100644 (file)
@@ -1,5 +1,10 @@
 2005-08-02  Diego Novillo  <dnovillo@redhat.com>
 
+       PR 23164
+       * g++.dg/tree-ssa/pr23164.C: New test.
+
+2005-08-02  Diego Novillo  <dnovillo@redhat.com>
+
        * gcc.dg/tree-ssa/pr23192.c: New test.
 
 2005-08-02  James A. Morrison  <phython@gcc.gnu.org>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr23164.C b/gcc/testsuite/g++.dg/tree-ssa/pr23164.C
new file mode 100644 (file)
index 0000000..2318a30
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+bool f();
+struct S {
+    S();
+    ~S();
+};
+void g() {
+    for (;;) {
+        S s1, s2, s3, s4, s5, s6;
+        if (f())
+            continue;
+        if (f())
+            return;
+    }
+}
index f2454b0..f8bca03 100644 (file)
@@ -529,22 +529,12 @@ bool
 cleanup_tree_cfg (void)
 {
   bool retval;
-  int i;
 
   timevar_push (TV_TREE_CLEANUP_CFG);
 
-  for (retval = true, i = 0; i < 5 && retval; i++)
+  do
     retval = cleanup_tree_cfg_1 ();
-
-#ifdef ENABLE_CHECKING
-  if (retval)
-    {
-      gcc_assert (!cleanup_control_flow ());
-      gcc_assert (!delete_unreachable_blocks ());
-      if (optimize > 0)
-       gcc_assert (!cleanup_forwarder_blocks ());
-    }
-#endif
+  while (retval);
 
   compact_blocks ();