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/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.


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 ---


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