This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/47290] [4.5/4.6 Regression] memory exhausted compiling a destructor with an infinite 'for (;;);' loop


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]