From 91dd3df467e121426131cf477a77eb07d6062438 Mon Sep 17 00:00:00 2001
From: Changpeng Fang <chfang@houghton.(none)>
Date: Mon, 14 Jun 2010 16:46:06 -0700
Subject: [PATCH 3/3] Do not form natural loops when non-local labels exist in the current function

	*cfgloop.c (flow_loops_find): When the current function has non local
	labels, there are no natural loops in the function.
---
 gcc/cfgloop.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c
index 858e75b..d2ba445 100644
--- a/gcc/cfgloop.c
+++ b/gcc/cfgloop.c
@@ -394,6 +394,18 @@ flow_loops_find (struct loops *loops)
       return 1;
     }
 
+ /* When the current function has non local labels, there are no
+     natural loops in the function.  */
+  if (cfun->has_nonlocal_label)
+    {
+      init_loops_structure (loops, 1);
+
+      FOR_EACH_BB (bb)
+	bb->loop_father = loops->tree_root;
+
+      return 1;
+    }
+
   dfs_order = NULL;
   rc_order = NULL;
 
-- 
1.6.3.3

