From: marxin Date: Thu, 16 Jul 2015 14:48:18 +0000 (+0000) Subject: Fix PR ipa/66896. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1739ec91f99e0b9f914fa10280d7529d918b2c6f;p=thirdparty%2Fgcc.git Fix PR ipa/66896. * g++.dg/ipa/pr66896.c: New test. PR ipa/66896. * ipa-prop.c (update_jump_functions_after_inlining): Create properly dst_ctx if it does not exist. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225887 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90254ffb0a80..fa938d880efd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-07-16 Martin Liska + + PR ipa/66896. + * ipa-prop.c (update_jump_functions_after_inlining): Create properly + dst_ctx if it does not exist. + 2015-07-16 Martin Liska * hash-set.h (remove): New function. diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index aa659b747e1d..c862cfff8d96 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2377,11 +2377,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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9bace80590df..aa807cc2bfe3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-07-16 Martin Liska + + * g++.dg/ipa/pr66896.c: New test. + 2015-07-16 Richard Biener PR tree-optimization/66894