OSDN Git Service

* config/darwin-driver.c (darwin_default_min_version): Fix
[pf3gnuchains/gcc-fork.git] / gcc / domwalk.c
index c40ab82..cec95a5 100644 (file)
@@ -1,12 +1,13 @@
 /* Generic dominator tree walker
-   Copyright (C) 2003, 2004, 2005 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.
 
 GCC is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GCC is distributed in the hope that it will be useful,
@@ -15,9 +16,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
@@ -152,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
@@ -212,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;