re PR tree-optimization/50767 (ICE: in refs_may_alias_p_1, at tree-ssa-alias.c:1004 with -O2 -fno-tree-copy-prop -fno-tree-dominator-opts)

2011-10-18  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/50767
	* tree-ssa-pre.c (create_expression_by_pieces): Update the
	folded statement.

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

From-SVN: r180134
This commit is contained in:
Richard Guenther 2011-10-18 11:44:15 +00:00 committed by Richard Biener
parent 5b6b2942cd
commit 748c511454
4 changed files with 34 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2011-10-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50767
* tree-ssa-pre.c (create_expression_by_pieces): Update the
folded statement.
2011-10-18 Julian Brown <julian@codesourcery.com>
* config/arm/arm.c (arm_block_move_unaligned_straight)

View File

@ -1,3 +1,8 @@
2011-10-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50767
* gcc.dg/torture/pr50767.c: New testcase.
2011-10-18 Julian Brown <julian@codesourcery.com>
* lib/target-supports.exp (check_effective_target_arm_unaligned): New.

View File

@ -0,0 +1,21 @@
/* { dg-do compile } */
/* { dg-options "-fno-tree-copy-prop -fno-tree-dominator-opts" } */
struct S
{
struct S *s;
};
static struct S *ss;
struct S *s;
void bar(void);
void foo(void)
{
for (;;)
{
s->s = ss;
bar ();
}
}

View File

@ -3188,7 +3188,8 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
/* Fold the last statement. */
gsi = gsi_last (*stmts);
fold_stmt_inplace (&gsi);
if (fold_stmt_inplace (&gsi))
update_stmt (gsi_stmt (gsi));
/* Add a value number to the temporary.
The value may already exist in either NEW_SETS, or AVAIL_OUT, because