diff options
author | Martin Liska <mliska@suse.cz> | 2015-07-16 16:48:18 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2015-07-16 14:48:18 +0000 |
commit | a7d1f3fedcddc06f8f4b3d761c928fb5de3a3082 (patch) | |
tree | cdc16141e1aaeb9833879827128954d56bb21e07 /gcc/ipa-prop.c | |
parent | ce7bc090cd410e6003f3bb3346513b1b8193eb15 (diff) | |
download | gcc-a7d1f3fedcddc06f8f4b3d761c928fb5de3a3082.zip gcc-a7d1f3fedcddc06f8f4b3d761c928fb5de3a3082.tar.gz gcc-a7d1f3fedcddc06f8f4b3d761c928fb5de3a3082.tar.bz2 |
re PR ipa/66896 (ipa-prop.c:2479 runtime error: member call on null pointer of type 'struct ipa_polymorphic_call_context')
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.
From-SVN: r225887
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 aa659b7..c862cff 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 |