diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-11-21 12:09:01 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2001-11-21 12:09:01 +0100 |
commit | 83dea45d59b06dc8d99c78e471f97957c54105eb (patch) | |
tree | d4dbd995c69a21a68564a08a32a7170a31f8784a /gcc/c-decl.c | |
parent | a558c691e1e5042060a962899d8a2d0881010653 (diff) | |
download | gcc-83dea45d59b06dc8d99c78e471f97957c54105eb.zip gcc-83dea45d59b06dc8d99c78e471f97957c54105eb.tar.gz gcc-83dea45d59b06dc8d99c78e471f97957c54105eb.tar.bz2 |
c-decl.c (c_expand_deferred_function): Only call c_expand_body if fndecl is still DECL_INLINE and has DECL_RESULT.
* c-decl.c (c_expand_deferred_function): Only call c_expand_body
if fndecl is still DECL_INLINE and has DECL_RESULT.
* gcc.c-torture/compile/20011119-1.c: New test.
* gcc.c-torture/compile/20011119-2.c: New test.
From-SVN: r47240
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 4d7ca2b..f7651c0 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -6768,8 +6768,13 @@ void c_expand_deferred_function (fndecl) tree fndecl; { - c_expand_body (fndecl, 0, 0); - current_function_decl = NULL; + /* DECL_INLINE or DECL_RESULT might got cleared after the inline + function was deferred, e.g. in duplicate_decls. */ + if (DECL_INLINE (fndecl) && DECL_RESULT (fndecl)) + { + c_expand_body (fndecl, 0, 0); + current_function_decl = NULL; + } } /* Generate the RTL for the body of FNDECL. If NESTED_P is non-zero, |