This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [LTO][PATCH] Fix another undefined reference problem.
- From: Diego Novillo <dnovillo at google dot com>
- To: Doug Kwan (éæå) <dougkwan at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 12 Dec 2008 07:30:46 -0500
- Subject: Re: [LTO][PATCH] Fix another undefined reference problem.
- References: <498552560812111914k598e29c3vbd97f81169c448d6@mail.gmail.com>
2008/12/11 Doug Kwan (???) <dougkwan@google.com>:
> This patch fixes another problem where DECLs of unemitted
> functions are written as exportable in the IL. The previous code used
> gimple_body to check for availability of function bodies and that was
> wrong.
Sorry for having missed that. I should've suggested using
gimple_has_body_p(). This predicate will return true if the functions
has a gimple body whether in CFG form or not.
> +static bool
> +cp_fix_function_decl_p (tree decl)
> +{
> + /* Skip if DECL is not externally. */
s/externally/externally visible/
> + if (!TREE_PUBLIC (decl))
> + return false;
> +
> + /* We need to fix DECL if it a appears to be exported but with no
> + function body. Thunks do not have CFGs and we may need to
> + handle them specially later. */
> + if ((!DECL_STRUCT_FUNCTION (decl)
> + || !DECL_STRUCT_FUNCTION (decl)->cfg)
has_gimple_body_p (decl)
> - /* This should only happen for inlines or implicit instanitations
> - which are not emitted. When we reach here, we should have read
> - the EOF and expanded all needed functions. */
> - gcc_assert ((DECL_DECLARED_INLINE_P (t)
> - || DECL_IMPLICIT_INSTANTIATION (t))
> - && at_eof);
> -
Why are you removing this assertion? Also, why is it not necessary to check
for DECL_INTERFACE_KNOWN anymore?
Thanks. Diego.