* ipa-cp.c (ipa_get_indirect_edge_target_1): Check that param_index is
within bounds at the beginning of the function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199953
138bc75d-0d04-0410-961f-
82ee72b054a4
+2013-06-11 Martin Jambor <mjambor@suse.cz>
+
+ * ipa-cp.c (ipa_get_indirect_edge_target_1): Check that param_index is
+ within bounds at the beginning of the function.
+
2013-06-11 Alan Modra <amodra@gmail.com>
* varasm.c (get_section): Don't die on !DECL_P decl. Tidy error
tree otr_type;
tree t;
- if (param_index == -1)
+ if (param_index == -1
+ || known_vals.length () <= (unsigned int) param_index)
return NULL_TREE;
if (!ie->indirect_info->polymorphic)
t = NULL;
}
else
- t = (known_vals.length () > (unsigned int) param_index
- ? known_vals[param_index] : NULL);
+ t = known_vals[param_index];
if (t &&
TREE_CODE (t) == ADDR_EXPR