diff options
author | Richard Henderson <rth@redhat.com> | 2003-03-26 14:53:37 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-03-26 14:53:37 -0800 |
commit | 3684a055a057aac41755fb491c3e7811fc9d2be8 (patch) | |
tree | 40e101ec1a304189da3cf503f6390f36111d1121 /gcc/c-decl.c | |
parent | 1c81e34352a99967cc1f42c82d71b0dfcfb57332 (diff) | |
download | gcc-3684a055a057aac41755fb491c3e7811fc9d2be8.tar.gz |
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
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 52b42a18c06..d52823bde97 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -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. */ |