diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-05-23 16:31:14 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-05-23 16:31:14 +0000 |
commit | c5453dec4351811c204c87a7bd060a9766f05402 (patch) | |
tree | 6d60bac35eb001644b72a0afe1a3b366627a2229 | |
parent | 1398da0f786e120bb0b407e84f412aa9fc6d80ee (diff) | |
download | gcc-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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ipa-cp.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d838407bc0b..f7a012c32bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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. + 2016-05-23 Marek Polacek <polacek@redhat.com> PR c/49859 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; } |