This is the mail archive of the
mailing list for the GCC project.
Re: [GOOGLE] Treat artificial from aux modules as non-external
- From: Xinliang David Li <davidxl at google dot com>
- To: Teresa Johnson <tejohnson at google dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 16 Oct 2014 09:23:00 -0700
- Subject: Re: [GOOGLE] Treat artificial from aux modules as non-external
- Authentication-results: sourceware.org; auth=none
- References: <CAAe5K+Ut0pWH0RdQ2cXWKEyEUbtQkL+2ptxY-pSkK1bMqtWCpg at mail dot gmail dot com>
Ok if large tests pass.
On Thu, Oct 16, 2014 at 9:16 AM, Teresa Johnson <email@example.com> wrote:
> The following patch fixes a LIPO issue with a virtual implicitly
> instantiated destructor from an aux module that was needed when we
> devirtualized a call from the primary module, but it was not available
> (not promoted to global) in aux module since it is DECL_ARTIFICIAL.
> Fixes compilation issue, passes regression tests. Ok for google/4_9?
> 2014-10-16 Teresa Johnson <firstname.lastname@example.org>
> Google ref b/17971995.
> * l-ipo.c (cgraph_is_aux_decl_external): Artificial functions may
> not be available in primary module.
> Index: l-ipo.c
> --- l-ipo.c (revision 216286)
> +++ l-ipo.c (working copy)
> @@ -1140,8 +1140,11 @@ cgraph_is_aux_decl_external (struct cgraph_node *n
> /* Comdat or weak functions in aux modules are not external --
> there is no guarantee that the definitition will be emitted
> - in the primary compilation of this auxiliary module. */
> - if (DECL_COMDAT (decl) || DECL_WEAK (decl))
> + in the primary compilation of this auxiliary module.
> + Functions marked artificial (e.g. an implicitly instantiated virtual
> + destructor) are also not guaranteed to be available in the primary module,
> + as they are not promoted by process_module_scope_static_func. */
> + if (DECL_COMDAT (decl) || DECL_WEAK (decl) || DECL_ARTIFICIAL (decl))
> return false;
> /* virtual functions won't be deleted in the primary module. */
> Teresa Johnson | Software Engineer | email@example.com | 408-460-2413