diff options
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index dd07516..180d21e 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -3061,6 +3061,13 @@ cgraph_node::verify_node (void) error ("inline clone in same comdat group list"); error_found = true; } + if (inlined_to && !count.compatible_p (inlined_to->count)) + { + error ("inline clone count is not compatible"); + count.debug (); + inlined_to->count.debug (); + error_found = true; + } if (!definition && !in_other_partition && local) { error ("local symbols must be defined"); @@ -3089,6 +3096,13 @@ cgraph_node::verify_node (void) identifier_to_locale (e->caller->name ())); error_found = true; } + if (!e->count.compatible_p (count)) + { + error ("edge count is not compatible with function count"); + e->count.debug (); + count.debug (); + error_found = true; + } if (!e->indirect_unknown_callee || !e->indirect_info) { @@ -3137,6 +3151,13 @@ cgraph_node::verify_node (void) { if (e->verify_count ()) error_found = true; + if (!e->count.compatible_p (count)) + { + error ("edge count is not compatible with function count"); + e->count.debug (); + count.debug (); + error_found = true; + } if (gimple_has_body_p (e->caller->decl) && !e->caller->inlined_to && !e->speculative |