aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2012-01-13 22:25:44 +0000
committerIan Lance Taylor <iant@google.com>2012-01-13 22:25:44 +0000
commit9193073ea888be4ab0dcaca9b2dbc71e95404508 (patch)
tree991dad8d536375d0b134be2333d09b76fb5002e2 /gcc/ipa-cp.c
parentdddb925f4e5807caa849e6f551fa4ad650512893 (diff)
* ipa-cp.c (ipa_get_indirect_edge_target): Add typecasts when
comparing param_index to VEC_length result. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@183166 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index ae38366c2ca..8a4f99259b2 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -1112,7 +1112,7 @@ ipa_get_indirect_edge_target (struct cgraph_edge *ie,
if (!ie->indirect_info->polymorphic)
{
- tree t = (VEC_length (tree, known_vals) > param_index
+ tree t = (VEC_length (tree, known_vals) > (unsigned int) param_index
? VEC_index (tree, known_vals, param_index) : NULL);
if (t &&
TREE_CODE (t) == ADDR_EXPR
@@ -1127,7 +1127,8 @@ ipa_get_indirect_edge_target (struct cgraph_edge *ie,
otr_type = ie->indirect_info->otr_type;
t = VEC_index (tree, known_vals, param_index);
- if (!t && known_binfos && VEC_length (tree, known_binfos) > param_index)
+ if (!t && known_binfos
+ && VEC_length (tree, known_binfos) > (unsigned int) param_index)
t = VEC_index (tree, known_binfos, param_index);
if (!t)
return NULL_TREE;