* [PATCH] Fix PR51903
@ 2012-01-20 10:06 Richard Guenther
0 siblings, 0 replies; only message in thread
From: Richard Guenther @ 2012-01-20 10:06 UTC (permalink / raw)
To: gcc-patches
This fixes PR51903, bootstrapped and tested on x86_64-unknown-linnux-gnu,
installed.
Richard.
2012-01-20 Richard Guenther <rguenther@suse.de>
PR tree-optimization/51903
* tree-ssa-pre.c (eliminate): Properly purging of EH edges
when removing stmts.
* g++.dg/torture/pr51903.C: New testcase.
Index: gcc/tree-ssa-pre.c
===================================================================
*** gcc/tree-ssa-pre.c (revision 183296)
--- gcc/tree-ssa-pre.c (working copy)
*************** eliminate (void)
*** 4541,4548 ****
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);
--- 4541,4550 ----
gsi = gsi_for_stmt (stmt);
unlink_stmt_vdef (stmt);
gsi_remove (&gsi, true);
! /* ??? gsi_remove doesn't tell us whether the stmt was
! in EH tables and thus whether we need to purge EH edges.
! Simply schedule the block for a cleanup. */
! bitmap_set_bit (need_eh_cleanup, bb->index);
if (TREE_CODE (lhs) == SSA_NAME)
bitmap_clear_bit (inserted_exprs, SSA_NAME_VERSION (lhs));
release_defs (stmt);
Index: gcc/testsuite/g++.dg/torture/pr51903.C
===================================================================
*** gcc/testsuite/g++.dg/torture/pr51903.C (revision 0)
--- gcc/testsuite/g++.dg/torture/pr51903.C (revision 0)
***************
*** 0 ****
--- 1,9 ----
+ // { dg-do compile }
+ // { dg-options "-O2 -fnon-call-exceptions -fno-guess-branch-probability" }
+
+ #include <vector>
+
+ void foo ()
+ {
+ std::vector < std::vector< int > > (20000);
+ }
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-20 10:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-20 10:06 [PATCH] Fix PR51903 Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).