public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xinliang David Li <davidxl@google.com>
To: Dehao Chen <dehao@google.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [GOOGLE] Avoid emitting duplicated weakref
Date: Sun, 09 Jun 2013 03:31:00 -0000	[thread overview]
Message-ID: <CAAkRFZJSHoTAQ_q7TSkxU_RAbAdBxi1z=3penQf+TzmFGUet=Q@mail.gmail.com> (raw)
In-Reply-To: <CAO2gOZUpcpdSSaaXU4zUAV2WOzE3A18zzQe858MnQeBWEXagjA@mail.gmail.com>

Guard also with L_IPO_COMP_MODE as this is lipo specific.

David

On Sat, Jun 8, 2013 at 8:29 PM, Dehao Chen <dehao@google.com> wrote:
> This patch fixes a bug when two weakref symbols are mapped to a same
> assembler name.
>
> Testing on going.
>
> OK for google branches if test is fine?
>
> Thanks,
> Dehao
>
> Index: gcc/varasm.c
> ===================================================================
> --- gcc/varasm.c (revision 199844)
> +++ gcc/varasm.c (working copy)
> @@ -5502,6 +5502,10 @@ do_assemble_alias (tree decl, tree target)
>    if (TREE_ASM_WRITTEN (decl))
>      return;
>
> +  if (lookup_attribute ("weakref", DECL_ATTRIBUTES (decl))
> +      && TREE_ASM_WRITTEN (DECL_ASSEMBLER_NAME (decl)))
> +    return;
> +
>    /* We must force creation of DECL_RTL for debug info generation, even though
>       we don't use it here.  */
>    make_decl_rtl (decl);

  reply	other threads:[~2013-06-09  3:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-09  3:30 Dehao Chen
2013-06-09  3:31 ` Xinliang David Li [this message]
2013-06-11  9:09   ` Bernhard Reutner-Fischer
2013-06-11  9:23     ` Jan Hubicka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAkRFZJSHoTAQ_q7TSkxU_RAbAdBxi1z=3penQf+TzmFGUet=Q@mail.gmail.com' \
    --to=davidxl@google.com \
    --cc=dehao@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).