From: Martin Jambor Date: Mon, 23 May 2016 16:31:14 +0000 (+0200) Subject: [PR 71234] Avoid valgrind warning in ipa-cp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=44a71f36580a4e0d05e3d787b4e54991ac26026a;p=gcc.git [PR 71234] Avoid valgrind warning in ipa-cp 2016-05-23 Martin Jambor PR ipa/71234 * ipa-cp.c (ipa_get_indirect_edge_target_1): Only check value of from_global_constant if t is not NULL. From-SVN: r236598 --- 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 + + 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 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; }