OSDN Git Service

* config/darwin-driver.c (darwin_default_min_version): Fix
[pf3gnuchains/gcc-fork.git] / gcc / domwalk.c
index a58437e..cec95a5 100644 (file)
@@ -1,5 +1,6 @@
 /* Generic dominator tree walker
-   Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation,
+   Inc.
    Contributed by Diego Novillo <dnovillo@redhat.com>
 
 This file is part of GCC.
@@ -151,7 +152,9 @@ walk_dominator_tree (struct dom_walk_data *walk_data, basic_block bb)
   while (true)
     {
       /* Don't worry about unreachable blocks.  */
-      if (EDGE_COUNT (bb->preds) > 0 || bb == ENTRY_BLOCK_PTR)
+      if (EDGE_COUNT (bb->preds) > 0
+         || bb == ENTRY_BLOCK_PTR
+         || bb == EXIT_BLOCK_PTR)
        {
          /* If block BB is not interesting to the caller, then none of the
             callbacks that walk the statements in BB are going to be
@@ -211,7 +214,7 @@ walk_dominator_tree (struct dom_walk_data *walk_data, basic_block bb)
            (*walk_data->before_dom_children_after_stmts) (walk_data, bb);
 
          /* Mark the current BB to be popped out of the recursion stack
-            once childs are processed.  */
+            once children are processed.  */
          worklist[sp++] = bb;
          worklist[sp++] = NULL;