From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23881 invoked by alias); 9 Jun 2013 03:31:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 23866 invoked by uid 89); 9 Jun 2013 03:31:33 -0000 X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.1 Received: from mail-wi0-f175.google.com (HELO mail-wi0-f175.google.com) (209.85.212.175) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 09 Jun 2013 03:31:32 +0000 Received: by mail-wi0-f175.google.com with SMTP id m6so541728wiv.8 for ; Sat, 08 Jun 2013 20:31:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=RJxZKqCfxiCpfD62BW5NG04B15OIr7fcpdmHjkUIZqc=; b=SJAe/stIilSjeOv7WmDLgRpDkrJi7UoMk7yNCj9NOln81ErBAjDKoS+VQZ4aHGvxjN /AEw8R59UaKrPWDF911aBYn2TNAKKKoMKU+c+xqzaokAJv0UuAU1z/GCzVoTgtjAaN2U XUsg4tEKZ0lxZxESiB+/nIIDAnNFEORysLdZHb8rmxQacrYV9JBjnULPqYws01pkMDxe 4rw46hQn4yRZMGYyr8A4Hias9FFbVKBkvaQdEJ3nANy+Fmcv2mlVpm2ZrXpo1RXHvNnq bnE3gfcZnA3w3gAp1vIezZbk+HowM9CrVA2+EAnN/GbPdaReWcnDdPhpbzPIrrI9Pcro Y2TA== MIME-Version: 1.0 X-Received: by 10.180.206.176 with SMTP id lp16mr1917477wic.43.1370748690290; Sat, 08 Jun 2013 20:31:30 -0700 (PDT) Received: by 10.180.6.229 with HTTP; Sat, 8 Jun 2013 20:31:30 -0700 (PDT) In-Reply-To: References: Date: Sun, 09 Jun 2013 03:31:00 -0000 Message-ID: Subject: Re: [GOOGLE] Avoid emitting duplicated weakref From: Xinliang David Li To: Dehao Chen Cc: GCC Patches Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmZXEXjIibpNQ2DBes1fFu7jGw4E1gfW6dQNAjXVb6ewjuRINq5OXjiFFbs0qOl8sAqW7f6nULsxhtfVaQFVNL03IhMhbaCnYPSFa5W8TiXGQ+g9f2TBd3T6pphds2CFtgbg9zj/oWUx2r/1adklwRY35G/iEn5dJy1wN/2EU/rLMRvXb8arV6LD29kmoZ2lm3tpIC1pqDEmfuLGv4n13Fky8WCEw== X-SW-Source: 2013-06/txt/msg00466.txt.bz2 Guard also with L_IPO_COMP_MODE as this is lipo specific. David On Sat, Jun 8, 2013 at 8:29 PM, Dehao Chen 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);