Fri, 20 Jun 2014 08:14:30 +0200
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
src/share/vm/opto/compile.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/opto/compile.cpp Tue Jun 19 02:53:25 2018 -0700 1.2 +++ b/src/share/vm/opto/compile.cpp Fri Jun 20 08:14:30 2014 +0200 1.3 @@ -3480,7 +3480,7 @@ 1.4 _root->verify_edges(visited); 1.5 if (no_dead_code) { 1.6 // Now make sure that no visited node is used by an unvisited node. 1.7 - bool dead_nodes = 0; 1.8 + bool dead_nodes = false; 1.9 Unique_Node_List checked(area); 1.10 while (visited.size() > 0) { 1.11 Node* n = visited.pop(); 1.12 @@ -3491,14 +3491,16 @@ 1.13 if (visited.member(use)) continue; // already in the graph 1.14 if (use->is_Con()) continue; // a dead ConNode is OK 1.15 // At this point, we have found a dead node which is DU-reachable. 1.16 - if (dead_nodes++ == 0) 1.17 + if (!dead_nodes) { 1.18 tty->print_cr("*** Dead nodes reachable via DU edges:"); 1.19 + dead_nodes = true; 1.20 + } 1.21 use->dump(2); 1.22 tty->print_cr("---"); 1.23 checked.push(use); // No repeats; pretend it is now checked. 1.24 } 1.25 } 1.26 - assert(dead_nodes == 0, "using nodes must be reachable from root"); 1.27 + assert(!dead_nodes, "using nodes must be reachable from root"); 1.28 } 1.29 } 1.30 }