changeset 8861:c96534cd81fe

8008321: compile.cpp verify_graph_edges uses bool as int Summary: The dead_nodes counter in verify_graph_edges(..) has the type bool but is used as int. Reviewed-by: roland, anoll
author thartmann
date Fri, 20 Jun 2014 08:14:30 +0200
parents 95b3ba140211
children 0fa4c2b668b9
files src/share/vm/opto/compile.cpp
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/compile.cpp	Tue Jun 19 02:53:25 2018 -0700
+++ b/src/share/vm/opto/compile.cpp	Fri Jun 20 08:14:30 2014 +0200
@@ -3480,7 +3480,7 @@
     _root->verify_edges(visited);
     if (no_dead_code) {
       // Now make sure that no visited node is used by an unvisited node.
-      bool dead_nodes = 0;
+      bool dead_nodes = false;
       Unique_Node_List checked(area);
       while (visited.size() > 0) {
         Node* n = visited.pop();
@@ -3491,14 +3491,16 @@
           if (visited.member(use))  continue;  // already in the graph
           if (use->is_Con())        continue;  // a dead ConNode is OK
           // At this point, we have found a dead node which is DU-reachable.
-          if (dead_nodes++ == 0)
+          if (!dead_nodes) {
             tty->print_cr("*** Dead nodes reachable via DU edges:");
+            dead_nodes = true;
+          }
           use->dump(2);
           tty->print_cr("---");
           checked.push(use);  // No repeats; pretend it is now checked.
         }
       }
-      assert(dead_nodes == 0, "using nodes must be reachable from root");
+      assert(!dead_nodes, "using nodes must be reachable from root");
     }
   }
 }