diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-26 22:53:37 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-26 22:53:37 +0000 |
commit | 691aa38a3e65879043538ee23693297a79a87479 (patch) | |
tree | 40e101ec1a304189da3cf503f6390f36111d1121 /gcc/c-decl.c | |
parent | b4cdaf79a4a040559eaf3239414cdf02d89d6b15 (diff) | |
download | gcc-691aa38a3e65879043538ee23693297a79a87479.tar.gz |
* c-decl.c (finish_function): Always defer if DECL_DECLARED_INLINE_P.
* gcc.dg/inline-4.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64906 138bc75d-0d04-0410-961f-82ee72b054a4
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. */ |