From 06191a239b2fe34bcc7338dcefdb1f3b9289c239 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 24 Sep 2005 14:43:30 +0200 Subject: cgraph.c (cgraph_clone_edge): Make the scale gcov_type. * cgraph.c (cgraph_clone_edge): Make the scale gcov_type. (cgraph_clone_node): Likewise. * cgraph.h (cgraph_clone_edge): Update prototype. (cgraph_mark_inline_edge, cgraph_clone_inlined_nodes): Remove duplicated prototypes; add updating argument. * cgraphunit.c (verify_cgraph_node): Verify that counts are non-negative. * ipa-inline.c (cgraph_clone_inlined_nodes): Allow clonning without updating profile. (cgraph_mark_inline_edge): Likewise. (cgraph_mark_inline): Update use of cgraph_mark_inline_edge. (cgraph_flatten_node): Likewise. (cgraph_decide_recursive_inlining): Likewise. (cgraph_decide_inlining_of_small_function): Likewise. * tree-optimize.c (tree_rest_of_compilation): Likewise. From-SVN: r104601 --- gcc/cgraphunit.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gcc/cgraphunit.c') diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index e357a25..181ee4e 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -663,8 +663,18 @@ verify_cgraph_node (struct cgraph_node *node) cgraph_node_name (e->caller), cgraph_node_name (e->callee)); error_found = true; } + if (node->count < 0) + { + error ("Execution count is negative"); + error_found = true; + } for (e = node->callers; e; e = e->next_caller) { + if (e->count < 0) + { + error ("caller edge count is negative"); + error_found = true; + } if (!e->inline_failed) { if (node->global.inlined_to -- cgit v1.1