summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-16 14:53:08 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-16 14:53:08 +0000
commit70ad0a93ec33f52c85fc4a15e7eea99f3399b7ee (patch)
tree188af8def5366dfa1b16fbe830784a5a6306d2ee
parent5e70c4a1c4b4dbc8cbb25a85595e0a9f42f3b12c (diff)
downloadgcc-70ad0a93ec33f52c85fc4a15e7eea99f3399b7ee.tar.gz
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/branches/gcc-5-branch@225888 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ipa-prop.c12
-rw-r--r--gcc/testsuite/ChangeLog4
3 files changed, 18 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5a0dcbd69a4..9f6996b3e2e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-07-16 Martin Liska <mliska@suse.cz>
+
+ PR ipa/66896.
+ * ipa-prop.c (update_jump_functions_after_inlining): Create properly
+ dst_ctx if it does not exist.
+
2015-07-16 Richard Biener <rguenther@suse.de>
* BASE-VER: Set to 5.2.1.
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
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 45561a0f9bc..38e8b97ef36 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2015-07-16 Martin Liska <mliska@suse.cz>
+
+ * g++.dg/ipa/pr66896.c: New test.
+
2015-07-16 Marek Polacek <polacek@redhat.com>
Backported from mainline