From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9314 invoked by alias); 19 Feb 2015 17:08:40 -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 9304 invoked by uid 89); 19 Feb 2015 17:08:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Feb 2015 17:08:38 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by service87.mimecast.com; Thu, 19 Feb 2015 17:08:34 +0000 Received: from [10.2.207.44] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 19 Feb 2015 17:08:31 +0000 Message-ID: <54E6188F.507@arm.com> Date: Thu, 19 Feb 2015 17:25:00 -0000 From: Alex Velenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Richard Henderson , "H.J. Lu" CC: Jack Howarth , GCC Patches , Ramana Radhakrishnan , Jan Hubicka Subject: Re: [PATCH] PR rtl-optimization/32219: optimizer causees wrong code in pic/hidden/weak symbol checking References: <20150206162314.GA12597@intel.com> <20150207122739.GA25185@gmail.com> <20150207155606.GA14159@gmail.com> <20150207164507.GA19402@gmail.com> <54DA75D2.40402@redhat.com> <54DC46BF.5060503@redhat.com> <54DCFE10.3050906@redhat.com> <54DD3FA9.3010609@redhat.com> <54DD877E.7060500@redhat.com> <54E49EF6.3090601@arm.com> <54E5F041.6040701@redhat.com> In-Reply-To: <54E5F041.6040701@redhat.com> X-MC-Unique: 115021917083402501 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg01211.txt.bz2 On 19/02/15 14:16, Richard Henderson wrote: > On 02/18/2015 06:17 AM, Alex Velenko wrote: >> By changing behaviour of varasm.c:default_binds_local_p, this patch chan= ges >> behaviour of gcc/config/arm/arm.c:arm_function_in_section_p and through = it >> breaks gcc/config/arm/arm.c:arm_is_long_call_p for weak symbols. >> >> As a result, I get regression for gcc.target/arm/long-calls-1.c on >> arm-none-eabi: >> FAIL: gcc.target/arm/long-calls-1.c scan-assembler-not \tbl?\tweak_l1\n >> FAIL: gcc.target/arm/long-calls-1.c scan-assembler-not \tbl?\tweak_l3\n >> >> In https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html there >> is a description for -mlong-calls. >> >> This has to be fixed. > > Please file a bug, for tracking purposes. > > That said, it looks as if arm_function_in_section_p should be using > decl_binds_to_current_def_p instead of targetm.binds_local_p. > > That will properly reject weak symbols within a given module until we rec= eive > extra information from LTO indicating when a weak definition turns out to= be > the prevailing definition. > > > r~ > Hi Richard, Thank you for your reply. Here is the bug report. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D65121 Your suggestion seem to fix gcc.target/arm/long-calls-1.c, but has to be=20 thoroughly tested. Kind regards, Alex