From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103935 invoked by alias); 17 May 2018 08:18:41 -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 24790 invoked by uid 89); 17 May 2018 08:16:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,KAM_STOCKGEN autolearn=ham version=3.3.2 spammy=richi, Ping X-HELO: foss.arm.com Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 May 2018 08:16:20 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 084C080D; Thu, 17 May 2018 01:16:19 -0700 (PDT) Received: from [10.2.207.77] (e100706-lin.cambridge.arm.com [10.2.207.77]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 39D5D3F24A; Thu, 17 May 2018 01:16:18 -0700 (PDT) Message-ID: <5AFD3A50.4000409@foss.arm.com> Date: Thu, 17 May 2018 08:21:00 -0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "vladimir.mezentsev@oracle.com" , GCC Patches CC: Richard Biener , Jan Hubicka Subject: Re: [PATCH] PR gcc/84923 - gcc.dg/attr-weakref-1.c failed on aarch64 References: <1526020226-13904-1-git-send-email-vladimir.mezentsev@oracle.com> <63e57d97-54f1-8e02-089e-8a282e2d2046@oracle.com> In-Reply-To: <63e57d97-54f1-8e02-089e-8a282e2d2046@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-05/txt/msg00777.txt.bz2 Hi, Given this is a midend change it's a good idea to CC some of the maintainers of that area. I've copied richi and Honza. Thanks, Kyrill On 17/05/18 05:35, vladimir.mezentsev@oracle.com wrote: > Ping. > > -Vladimir > > > On 05/10/2018 11:30 PM, vladimir.mezentsev@oracle.com wrote: > > From: Vladimir Mezentsev > > > > When weakref_targets is not empty a target cannot be removed from the weak list. > > A small example is below when 'wv12' is removed from the weak list on aarch64: > > static vtype Wv12 __attribute__((weakref ("wv12"))); > > extern vtype wv12 __attribute__((weak)); > > > > Bootstrapped on aarch64-unknown-linux-gnu including (c,c++ and go). > > Tested on aarch64-linux-gnu. > > No regression. The attr-weakref-1.c test passed. > > > > ChangeLog: > > 2018-05-10 Vladimir Mezentsev > > > > PR gcc/84923 > > * varasm.c (weak_finish): clean up weak_decls > > --- > > gcc/varasm.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/gcc/varasm.c b/gcc/varasm.c > > index 85296b4..8cf6e1e 100644 > > --- a/gcc/varasm.c > > +++ b/gcc/varasm.c > > @@ -5652,7 +5652,8 @@ weak_finish (void) > > tree alias_decl = TREE_PURPOSE (t); > > tree target = ultimate_transparent_alias_target (&TREE_VALUE (t)); > > > > - if (! TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (alias_decl))) > > + if (! TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (alias_decl)) > > + || TREE_SYMBOL_REFERENCED (target)) > > /* Remove alias_decl from the weak list, but leave entries for > > the target alone. */ > > target = NULL_TREE; >