re PR tree-optimization/43379 (ICE: error: SSA_NAME_OCCURS_IN_ABNORMAL_PHI should be set with -O2 -ftracer)

2010-03-16  Richard Guenther  <rguenther@suse.de>

	PR middle-end/43379
	* tree-cfg.c (gimple_merge_blocks): When propagating virtual
	PHI operands make sure to merge SSA_NAME_OCCURS_IN_ABNORMAL_PHI
	properly.

	* gcc.dg/pr43379.c: New testcase.

From-SVN: r157478
This commit is contained in:
Richard Guenther 2010-03-16 12:31:38 +00:00 committed by Richard Biener
parent 7a1817642b
commit 7686fb74ef
4 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2010-03-16 Richard Guenther <rguenther@suse.de>
PR middle-end/43379
* tree-cfg.c (gimple_merge_blocks): When propagating virtual
PHI operands make sure to merge SSA_NAME_OCCURS_IN_ABNORMAL_PHI
properly.
2010-03-16 Aldy Hernandez <aldyh@redhat.com>
Alexandre Oliva <aoliva@redhat.com>

View File

@ -1,3 +1,8 @@
2010-03-16 Richard Guenther <rguenther@suse.de>
PR middle-end/43379
* gcc.dg/pr43379.c: New testcase.
2010-03-16 Jakub Jelinek <jakub@redhat.com>
PR debug/43051

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftracer" } */
void *foo(int i, int *p)
{
lab:
if (p) *p = i;
goto *p;
return &&lab;
}

View File

@ -1617,6 +1617,9 @@ gimple_merge_blocks (basic_block a, basic_block b)
FOR_EACH_IMM_USE_STMT (stmt, iter, def)
FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
SET_USE (use_p, use);
if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (def))
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use) = 1;
}
else
replace_uses_by (def, use);