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: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Jan 2011 14:50:06 +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 #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-17 14:49:53 UTC ---
Created attachment 22995
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22995
gcc46-pr47290.patch
Ugh, cddce pass for empty loop:
<L0>:
<bb 6>:
goto <bb 6>;
creates a preheader:
<L0>:
<bb 6>:
<bb 7>:
goto <bb 6>;
so suddenly we have an empty infinite loop containing two bbs instead of one,
on which cleanup_empty_eh keeps up oscillating between the landing pads on bb 6
and on bb 7 forever. There is a check already for empty infinite loops, but it
covers just those containing just single bb, not more than that.
I wonder if ehcleanup should be prepared for empty infinite loops containing
arbitrary number of bbs, or if worst case two of them should be possible (that
can be fixed by the attached patch) and why a preheader is created inside of
the loop instead of before it.