This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Jul 2011 00:08:24 +0000
- Subject: [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
- Auto-submitted: auto-generated
- References: <bug-49735-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-07-14 00:07:51 UTC ---
This patch fixes the infinite loop:
Index: ipa-inline.c
===================================================================
--- ipa-inline.c (revision 176253)
+++ ipa-inline.c (working copy)
@@ -1170,6 +1170,10 @@ recursive_inlining (struct cgraph_edge *
/* Make sure that function is small enough to be considered for inlining.
*/
if (estimate_size_after_inlining (node, edge) >= limit)
return false;
+ /* Inlining a builtin recursively into itself should not be done. */
+ if (DECL_BUILT_IN (edge->callee->decl))
+ return false;
+
heap = fibheap_new ();
lookup_recursive_calls (node, node, heap);
if (fibheap_empty (heap))
--- CUT ---