mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 03:50:26 +08:00
re PR middle-end/45316 (ICE: verify_flow_info failed: BB 3 can not throw but has an EH edge with -O1 -ftree-pre -fnon-call-exceptions)
2010-08-25 Richard Guenther <rguenther@suse.de> PR tree-optimization/45316 * tree-ssa-pre.c (eliminate): Properly clean EH info. * g++.dg/opt/pr45316.C: New testcase. From-SVN: r163543
This commit is contained in:
parent
90bc1cb81b
commit
a2c0ed2ee9
gcc
@ -1,3 +1,8 @@
|
||||
2010-08-25 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/45316
|
||||
* tree-ssa-pre.c (eliminate): Properly clean EH info.
|
||||
|
||||
2010-08-25 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/45393
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-08-25 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/45316
|
||||
* g++.dg/opt/pr45316.C: New testcase.
|
||||
|
||||
2010-08-25 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/45393
|
||||
|
28
gcc/testsuite/g++.dg/opt/pr45316.C
Normal file
28
gcc/testsuite/g++.dg/opt/pr45316.C
Normal file
@ -0,0 +1,28 @@
|
||||
// { dg-do compile }
|
||||
// { dg-options "-O1 -ftree-pre -fnon-call-exceptions" }
|
||||
|
||||
struct A
|
||||
{
|
||||
int i;
|
||||
};
|
||||
|
||||
struct B : A
|
||||
{
|
||||
int i[6];
|
||||
B (int = 0) : A ()
|
||||
{
|
||||
m ();
|
||||
}
|
||||
int m ();
|
||||
};
|
||||
|
||||
struct C : B
|
||||
{
|
||||
};
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
new C ();
|
||||
}
|
||||
|
@ -4498,9 +4498,12 @@ eliminate (void)
|
||||
if (TREE_CODE (lhs) != SSA_NAME
|
||||
|| has_zero_uses (lhs))
|
||||
{
|
||||
basic_block bb = gimple_bb (stmt);
|
||||
gsi = gsi_for_stmt (stmt);
|
||||
unlink_stmt_vdef (stmt);
|
||||
gsi_remove (&gsi, true);
|
||||
if (gimple_purge_dead_eh_edges (bb))
|
||||
todo |= TODO_cleanup_cfg;
|
||||
if (TREE_CODE (lhs) == SSA_NAME)
|
||||
bitmap_clear_bit (inserted_exprs, SSA_NAME_VERSION (lhs));
|
||||
release_defs (stmt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user