public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: Xinliang David Li <davidxl@google.com>
Cc: Dehao Chen <dehao@google.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
		Jan Hubicka <hubicka@ucw.cz>,
	"Joseph S. Myers" <joseph@codesourcery.com>
Subject: Re: [GOOGLE] Avoid emitting duplicated weakref
Date: Tue, 11 Jun 2013 09:09:00 -0000	[thread overview]
Message-ID: <CAC1BbcSv4arkRMD5tvL5ApUU=cfv4pAzcyTXZ10sycz4KawyLQ@mail.gmail.com> (raw)
In-Reply-To: <CAAkRFZJSHoTAQ_q7TSkxU_RAbAdBxi1z=3penQf+TzmFGUet=Q@mail.gmail.com>

On 9 June 2013 05:31, Xinliang David Li <davidxl@google.com> wrote:
> Guard also with L_IPO_COMP_MODE as this is lipo specific.

Sounds like this is the LIPO incarnation of http://gcc.gnu.org/PR31537

See the patch at http://gcc.gnu.org/PR31537#c9 for not adding the
alias in the first place (back then, honza may have changed that
recently on trunk).

Honza, Joseph,
Are there rules for handling weakrefs in some standard? If so, which ones?

Just curious..
Thanks,
>
> 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-11  9:09 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
2013-06-11  9:09   ` Bernhard Reutner-Fischer [this message]
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='CAC1BbcSv4arkRMD5tvL5ApUU=cfv4pAzcyTXZ10sycz4KawyLQ@mail.gmail.com' \
    --to=rep.dot.nop@gmail.com \
    --cc=davidxl@google.com \
    --cc=dehao@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=joseph@codesourcery.com \
    /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).