Commit 128c61ee by Martin Jambor Committed by Martin Jambor

re PR middle-end/50301 (416.gamess in SPEC CPU 2006 failed to build with LTO)

2011-09-07  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/50301
	* ipa-cp.c (find_more_values_for_callers_subset): Check jump
	function index bounds.
	(perhaps_add_new_callers): Likewise.

From-SVN: r178640
parent da990dc0
2011-09-07 Martin Jambor <mjambor@suse.cz> 2011-09-07 Martin Jambor <mjambor@suse.cz>
PR middle-end/50301
* ipa-cp.c (find_more_values_for_callers_subset): Check jump
function index bounds.
(perhaps_add_new_callers): Likewise.
2011-09-07 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/49911 PR tree-optimization/49911
* tree-sra.c (analyze_access_subtree): Change type of to-be-replaced * tree-sra.c (analyze_access_subtree): Change type of to-be-replaced
enumerations to the corresponding plain integer type. enumerations to the corresponding plain integer type.
...@@ -2052,8 +2052,12 @@ find_more_values_for_callers_subset (struct cgraph_node *node, ...@@ -2052,8 +2052,12 @@ find_more_values_for_callers_subset (struct cgraph_node *node,
struct ipa_jump_func *jump_func; struct ipa_jump_func *jump_func;
tree t; tree t;
if (i >= ipa_get_cs_argument_count (IPA_EDGE_REF (cs)))
{
newval = NULL_TREE;
break;
}
jump_func = ipa_get_ith_jump_func (IPA_EDGE_REF (cs), i); jump_func = ipa_get_ith_jump_func (IPA_EDGE_REF (cs), i);
t = ipa_value_from_jfunc (IPA_NODE_REF (cs->caller), jump_func); t = ipa_value_from_jfunc (IPA_NODE_REF (cs->caller), jump_func);
if (!t if (!t
|| (newval || (newval
...@@ -2123,6 +2127,11 @@ perhaps_add_new_callers (struct cgraph_node *node, struct ipcp_value *val) ...@@ -2123,6 +2127,11 @@ perhaps_add_new_callers (struct cgraph_node *node, struct ipcp_value *val)
if (!val) if (!val)
continue; continue;
if (i >= ipa_get_cs_argument_count (args))
{
insufficient = true;
break;
}
jump_func = ipa_get_ith_jump_func (args, i); jump_func = ipa_get_ith_jump_func (args, i);
t = ipa_value_from_jfunc (caller_info, jump_func); t = ipa_value_from_jfunc (caller_info, jump_func);
if (!t || !values_equal_for_ipcp_p (val, t)) if (!t || !values_equal_for_ipcp_p (val, t))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment