Commit f26aa48e by Richard Guenther Committed by Richard Biener

re PR tree-optimization/46216 (ICE: SSA corruption)

2010-11-02  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/46216
	* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
	Check if we can propagate from a POINTER_PLUS_EXPR before doing so.

	* gcc.dg/torture/pr46216.c: New testcase.

From-SVN: r166203
parent 23d50abb
2010-11-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46216
* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
Check if we can propagate from a POINTER_PLUS_EXPR before doing so.
2010-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (*-*-irix6*): Disable set_have_as_tls.
2010-11-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46216
* gcc.dg/torture/pr46216.c: New testcase.
2010-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/46131
......
/* { dg-do compile } */
typedef int Embryo_Cell;
int
embryo_program_run(Embryo_Cell *cip)
{
unsigned char op;
Embryo_Cell offs;
static const void *switchtable[256] = {
&&SWITCHTABLE_EMBRYO_OP_NONE, &&SWITCHTABLE_EMBRYO_OP_LOAD_PRI
};
for (;;)
{
op = *cip++;
while (1) {
goto *switchtable[op];
SWITCHTABLE_EMBRYO_OP_LOAD_PRI:
offs = *(Embryo_Cell *)cip++;
SWITCHTABLE_EMBRYO_OP_NONE:
break;
};
}
return offs;
}
......@@ -1983,7 +1983,8 @@ tree_ssa_forward_propagate_single_use_vars (void)
else
gsi_next (&gsi);
}
else if (gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR)
else if (gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR
&& can_propagate_from (stmt))
{
if (TREE_CODE (gimple_assign_rhs2 (stmt)) == INTEGER_CST
/* ??? Better adjust the interface to that function
......
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