This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/59626] [4.8/4.9 Regression] /usr/include/bits/unistd.h:173:1: error: inlining failed in call to always_inline 'readlinkat': recursive inlining
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 21 Mar 2014 13:58:38 +0000
- Subject: [Bug lto/59626] [4.8/4.9 Regression] /usr/include/bits/unistd.h:173:1: error: inlining failed in call to always_inline 'readlinkat': recursive inlining
- Auto-submitted: auto-generated
- References: <bug-59626-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59626
--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
Better patch - simply kill all bodies of extern always_inline functions before
LTO streaming... (we should be able to do that anyway)
Index: gcc/ipa.c
===================================================================
--- gcc/ipa.c (revision 208745)
+++ gcc/ipa.c (working copy)
@@ -1218,6 +1218,29 @@ static unsigned
free_inline_summary (void)
{
inline_free_summary ();
+ /* If we create LTO bytecode then drop bodies of extern always_inline
+ functions now. */
+ if (flag_lto)
+ {
+ cgraph_node *node;
+ FOR_EACH_DEFINED_FUNCTION (node)
+ if (DECL_EXTERNAL (node->decl)
+ && lookup_attribute ("always_inline",
+ DECL_ATTRIBUTES (node->decl)) != NULL)
+ {
+ cgraph_release_function_body (node);
+ /* ??? The above doesn't do what I like it to do ;) */
+ node->analyzed = false;
+ node->definition = false;
+ /* ??? Shouldn't be necessary but the diagnostic code doesn't
+ verify if there is a definition at all.
+ ??? Note attribute lists are possibly shared and
+ remove_attribute doesn't honor that. */
+ DECL_ATTRIBUTES (node->decl)
+ = remove_attribute ("always_inline",
+ DECL_ATTRIBUTES (node->decl));
+ }
+ }
return 0;
}