Commit 3684a055 by Richard Henderson Committed by Richard Henderson

c-decl.c (finish_function): Always defer if DECL_DECLARED_INLINE_P.

        * c-decl.c (finish_function): Always defer if DECL_DECLARED_INLINE_P.
	* gcc.dg/inline-4.c: New.

From-SVN: r64906
parent 1c81e343
2003-03-26 Richard Henderson <rth@redhat.com>
* c-decl.c (finish_function): Always defer if DECL_DECLARED_INLINE_P.
2003-03-26 Roger Sayle <roger@eyesopen.com>
PR bootstrap/10051, PR bootstrap/10169.
......
......@@ -6460,8 +6460,13 @@ finish_function (nested, can_defer_p)
function completely. */
timevar_push (TV_INTEGRATION);
uninlinable = ! tree_inlinable_function_p (fndecl, 0);
if (! uninlinable && can_defer_p
if (can_defer_p
/* We defer functions marked inline *even if* the function
itself is not inlinable. This is because we don't yet
know if the function will actually be used; we may be
able to avoid emitting it entirely. */
&& (! uninlinable || DECL_DECLARED_INLINE_P (fndecl))
/* Save function tree for inlining. Should return 0 if the
language does not support function deferring or the
function could not be deferred. */
......
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler-not "big_static_inline" } } */
extern void f(void);
static inline void big_static_inline(void)
{
f(); f(); f(); f(); f(); f(); f(); f(); f(); f();
f(); f(); f(); f(); f(); f(); f(); f(); f(); f();
f(); f(); f(); f(); f(); f(); f(); f(); f(); f();
f(); f(); f(); f(); f(); f(); f(); f(); f(); f();
f(); f(); f(); f(); f(); f(); f(); f(); f(); f();
f(); f(); f(); f(); f(); f(); f(); f(); f(); f();
f(); f(); f(); f(); f(); f(); f(); f(); f(); f();
f(); f(); f(); f(); f(); f(); f(); f(); f(); f();
f(); f(); f(); f(); f(); f(); f(); f(); f(); f();
f(); f(); f(); f(); f(); f(); f(); f(); f(); f();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment