This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/47290] [4.5/4.6 Regression] memory exhausted compiling a destructor with an infinite 'for (;;);' loop
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Jan 2011 10:31:47 +0000
- Subject: [Bug tree-optimization/47290] [4.5/4.6 Regression] memory exhausted compiling a destructor with an infinite 'for (;;);' loop
- Auto-submitted: auto-generated
- References: <bug-47290-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47290
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-18 10:31:32 UTC ---
How about
Index: tree-eh.c
===================================================================
--- tree-eh.c (revision 168906)
+++ tree-eh.c (working copy)
@@ -3710,6 +3710,9 @@ cleanup_empty_eh_unsplit (basic_block bb
if (find_edge (e->src, e_out->dest))
return false;
+ if (!single_pred_p (e_out->dest))
+ return false;
+
/* Attempt to move the PHIs into the successor block. */
if (cleanup_empty_eh_merge_phis (e_out->dest, bb, e_out, false))
{
? The condition before was added by me for another corner-case and
of course could be removed with that patch.