diff options
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 |