Commit a915ab00 by Jan Hubicka Committed by Jan Hubicka

re PR tree-optimization/40676 (internal compiler error: verify_ssa error:…

re PR tree-optimization/40676 (internal compiler error: verify_ssa error: definition in block 5 does not dominate use in block 7)

	PR tree-optimization/40676
	* tree-ssa-dce.c (eliminate_unnecessary_stmts): Do renaming on all
	virtual PHIs in empty BBs.

	* gcc.c-torture/compile/pr40676.c: New testcase.

From-SVN: r149789
parent 9d43fad9
2009-07-19 Jan Hubicka <jh@suse.cz>
PR tree-optimization/40676
* tree-ssa-dce.c (eliminate_unnecessary_stmts): Do renaming on all
virtual PHIs in empty BBs.
2009-07-18 Adam Nemet <anemet@caviumnetworks.com>
* combine.c (make_compound_operation) <SUBREG>: If force_to_mode
......
2009-07-19 Jan Hubicka <jh@suse.cz>
PR tree-optimization/40676
* gcc.c-torture/compile/pr40676.c: New testcase.
2009-07-18 Adam Nemet <anemet@caviumnetworks.com>
* gcc.target/mips/ext-2.c: New test.
......
extern int f1();
extern int f2(void*);
extern void* f3(int);
int xmsih;
typedef unsigned short XWCHAR;
inline unsigned int xstrlenW( const XWCHAR *str )
{
const XWCHAR *s = str;
while (*s) s++;
return s - str;
}
static int msi_dialog_register_class( void )
{
int cls;
if( !f2( &cls ) )
return 0;
if( !f2( &cls ) )
return 0;
xmsih = f1();
if( !xmsih )
return 0;
return 1;
}
void *xmsi_dialog_create(const XWCHAR* szDialogName)
{
msi_dialog_register_class();
return f3(xstrlenW(szDialogName));
}
......@@ -1137,7 +1137,8 @@ eliminate_unnecessary_stmts (void)
for (bb = ENTRY_BLOCK_PTR->next_bb; bb != EXIT_BLOCK_PTR; bb = next_bb)
{
next_bb = bb->next_bb;
if (!(bb->flags & BB_REACHABLE))
if (!TEST_BIT (bb_contains_live_stmts, bb->index)
|| !(bb->flags & BB_REACHABLE))
{
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
if (!is_gimple_reg (gimple_phi_result (gsi_stmt (gsi))))
......@@ -1159,7 +1160,8 @@ eliminate_unnecessary_stmts (void)
if (found)
mark_virtual_phi_result_for_renaming (gsi_stmt (gsi));
}
delete_basic_block (bb);
if (!(bb->flags & BB_REACHABLE))
delete_basic_block (bb);
}
}
}
......
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