[Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 14 00:08:00 GMT 2011
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 ---
More information about the Gcc-bugs
mailing list