summaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-03 10:09:20 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-03 10:09:20 +0000
commit7c1c3c9778dae8171cef5427b6aeb1f685525fc9 (patch)
treea78c4de9c588e10535d66baa6ecd9479d38e2bfe /gcc/ipa-cp.c
parent428783188d92606f231b12b06134e6d98a9a94b0 (diff)
downloadgcc-7c1c3c9778dae8171cef5427b6aeb1f685525fc9.tar.gz
2014-06-03 Martin Jambor <mjambor@suse.cz>
PR ipa/61160 * ipa-cp.c (cgraph_edge_brings_value_p): Handle edges leading to thunks. testsuite/ * g++.dg/ipa/pr61160-1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211170 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 08fb73e0e93..33ff9b63f6c 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -2482,7 +2482,8 @@ cgraph_edge_brings_value_p (struct cgraph_edge *cs,
struct ipcp_value_source *src)
{
struct ipa_node_params *caller_info = IPA_NODE_REF (cs->caller);
- struct ipa_node_params *dst_info = IPA_NODE_REF (cs->callee);
+ cgraph_node *real_dest = cgraph_function_node (cs->callee);
+ struct ipa_node_params *dst_info = IPA_NODE_REF (real_dest);
if ((dst_info->ipcp_orig_node && !dst_info->is_all_contexts_clone)
|| caller_info->node_dead)