This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR middle-end/29241
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 Oct 2006 09:32:41 +0200
- Subject: PR middle-end/29241
Hi,
this patch solve ICE in PR 29241 where we fail to inline always inline function
in -fnon-unit-at-a-time -fno-inline-functions because we already released it's
body.
Bootstrapped/regtested i686-linux, will commit it tomorrow unless I hear complains.
Honza
static inline __attribute__((always_inline)) void ip_finish_output2(){}
void ip_fragment(void (*)(void));
static inline __attribute__((always_inline)) void ip_finish_output()
{
ip_fragment(ip_finish_output2);
ip_finish_output2();
}
void ip_mc_output()
{
ip_finish_output();
}
void ip_output()
{
ip_finish_output();
}
PR middle-end/29241
* cgraphunit.c (cgraph_preserve_function_body_p): Even with
flag_really_no_inline, alwaysinline functions are inlined.
Index: cgraphunit.c
===================================================================
--- cgraphunit.c (revision 117672)
+++ cgraphunit.c (working copy)
@@ -1486,7 +1486,9 @@
{
struct cgraph_node *node;
if (!cgraph_global_info_ready)
- return (DECL_INLINE (decl) && !flag_really_no_inline);
+ return ((DECL_INLINE (decl) && !flag_really_no_inline)
+ || (flag_really_no_inline
+ && lang_hooks.tree_inlining.disregard_inline_limits (decl)));
/* Look if there is any clone around. */
for (node = cgraph_node (decl); node; node = node->next_clone)
if (node->global.inlined_to)