re PR tree-optimization/58164 (internal compiler error: in make_decl_rtl, at varasm.c:1147)

PR tree-optimization/58164
	* gimple.c (walk_stmt_load_store_addr_ops): For visit_addr
	walk gimple_goto_dest of GIMPLE_GOTO.

	* gcc.c-torture/compile/pr58164.c: New test.

From-SVN: r201782
This commit is contained in:
Jakub Jelinek 2013-08-16 11:05:52 +02:00 committed by Jakub Jelinek
parent 7a46059462
commit 639dc669ec
4 changed files with 22 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2013-08-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/58164
* gimple.c (walk_stmt_load_store_addr_ops): For visit_addr
walk gimple_goto_dest of GIMPLE_GOTO.
PR tree-optimization/58165
* tree-call-cdce.c (shrink_wrap_one_built_in_call): If
bi_call must be the last stmt in a bb, don't split_block, instead

View File

@ -4049,6 +4049,13 @@ walk_stmt_load_store_addr_ops (gimple stmt, void *data,
ret |= visit_addr (stmt, TREE_OPERAND (op, 0), data);
}
}
else if (visit_addr
&& gimple_code (stmt) == GIMPLE_GOTO)
{
tree op = gimple_goto_dest (stmt);
if (TREE_CODE (op) == ADDR_EXPR)
ret |= visit_addr (stmt, TREE_OPERAND (op, 0), data);
}
return ret;
}

View File

@ -1,5 +1,8 @@
2013-08-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/58164
* gcc.c-torture/compile/pr58164.c: New test.
PR tree-optimization/58165
* g++.dg/opt/pr58165.C: New test.

View File

@ -0,0 +1,8 @@
/* PR tree-optimization/58164 */
int
foo (void)
{
int x = 0;
goto *&x;
}