summaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-23 16:31:14 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-23 16:31:14 +0000
commitc5453dec4351811c204c87a7bd060a9766f05402 (patch)
tree6d60bac35eb001644b72a0afe1a3b366627a2229 /gcc/ipa-cp.c
parent1398da0f786e120bb0b407e84f412aa9fc6d80ee (diff)
downloadgcc-c5453dec4351811c204c87a7bd060a9766f05402.tar.gz
[PR 71234] Avoid valgrind warning in ipa-cp
2016-05-23 Martin Jambor <mjambor@suse.cz> PR ipa/71234 * ipa-cp.c (ipa_get_indirect_edge_target_1): Only check value of from_global_constant if t is not NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236598 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 8caa973e46c..4b7f6bbf31c 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -2027,7 +2027,8 @@ ipa_get_indirect_edge_target_1 (struct cgraph_edge *ie,
ie->indirect_info->offset,
ie->indirect_info->by_ref,
&from_global_constant);
- if (!from_global_constant
+ if (t
+ && !from_global_constant
&& !ie->indirect_info->guaranteed_unmodified)
t = NULL_TREE;
}