Commit 9576e7b1 by Martin Jambor Committed by Martin Jambor

re PR tree-optimization/55260 (ICE: in ipa_get_parm_lattices, at ipa-cp.c:263…

re PR tree-optimization/55260 (ICE: in ipa_get_parm_lattices, at ipa-cp.c:263 with -O2 -fno-inline -fipa-cp-clone)

2014-02-20  Martin Jambor  <mjambor@suse.cz>

	PR ipa/55260
	* ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Uce correct
	info when checking whether lattices are bottom.

testsuite/
	* gcc.dg/ipa/pr55260.c: New test.

From-SVN: r207941
parent 8c4d4205
2014-02-20 Martin Jambor <mjambor@suse.cz>
PR ipa/55260
* ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Uce correct
info when checking whether lattices are bottom.
2014-02-20 Richard Biener <rguenther@suse.de> 2014-02-20 Richard Biener <rguenther@suse.de>
PR middle-end/60221 PR middle-end/60221
......
...@@ -3256,6 +3256,7 @@ cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs, ...@@ -3256,6 +3256,7 @@ cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs,
struct cgraph_node *node) struct cgraph_node *node)
{ {
struct ipa_node_params *orig_caller_info = IPA_NODE_REF (cs->caller); struct ipa_node_params *orig_caller_info = IPA_NODE_REF (cs->caller);
struct ipa_node_params *orig_node_info;
struct ipa_agg_replacement_value *aggval; struct ipa_agg_replacement_value *aggval;
int i, ec, count; int i, ec, count;
...@@ -3270,6 +3271,7 @@ cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs, ...@@ -3270,6 +3271,7 @@ cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs,
if (aggval->index >= ec) if (aggval->index >= ec)
return false; return false;
orig_node_info = IPA_NODE_REF (IPA_NODE_REF (node)->ipcp_orig_node);
if (orig_caller_info->ipcp_orig_node) if (orig_caller_info->ipcp_orig_node)
orig_caller_info = IPA_NODE_REF (orig_caller_info->ipcp_orig_node); orig_caller_info = IPA_NODE_REF (orig_caller_info->ipcp_orig_node);
...@@ -3287,7 +3289,7 @@ cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs, ...@@ -3287,7 +3289,7 @@ cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs,
if (!interesting) if (!interesting)
continue; continue;
plats = ipa_get_parm_lattices (orig_caller_info, aggval->index); plats = ipa_get_parm_lattices (orig_node_info, aggval->index);
if (plats->aggs_bottom) if (plats->aggs_bottom)
return false; return false;
......
2014-02-20 Martin Jambor <mjambor@suse.cz>
PR ipa/55260
* gcc.dg/ipa/pr55260.c: New test.
2014-02-20 Bin Cheng <bin.cheng@arm.com> 2014-02-20 Bin Cheng <bin.cheng@arm.com>
* gcc.dg/tree-prof/crossmodule-indircall-1.c: Return 0 * gcc.dg/tree-prof/crossmodule-indircall-1.c: Return 0
......
/* { dg-do compile } */
/* { dg-options "-O2 -fno-inline -fipa-cp-clone" } */
typedef struct {
int *ptr;
int len;
} string;
typedef struct {
string nantstr;
int *nant;
} malv;
typedef struct {
int *nor;
} list_heads;
int b;
list_heads *fn1(string, int *, unsigned);
void fn2(malv *p1, list_heads *p2, unsigned p3) {
string a = p1->nantstr;
fn1(a, p1->nant, p3);
}
void fn3(unsigned p1) { fn2(0, 0, p1); }
list_heads *fn1(string p1, int *p2, unsigned p3) {
while (1) {
if (p3)
fn3(1);
if (b)
return 0;
fn3(1);
}
}
void fn5() {
list_heads c;
c.nor = 0;
fn2(0, &c, 1);
}
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