diff options
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index dc8f3606b1e..d828ccf49da 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2472,11 +2472,15 @@ update_jump_functions_after_inlining (struct cgraph_edge *cs, ctx.offset_by (dst->value.ancestor.offset); if (!ctx.useless_p ()) { - vec_safe_grow_cleared (args->polymorphic_call_contexts, - count); - dst_ctx = ipa_get_ith_polymorhic_call_context (args, i); + if (!dst_ctx) + { + vec_safe_grow_cleared (args->polymorphic_call_contexts, + count); + dst_ctx = ipa_get_ith_polymorhic_call_context (args, i); + } + + dst_ctx->combine_with (ctx); } - dst_ctx->combine_with (ctx); } if (src->agg.items |