From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6367 invoked by alias); 30 Jun 2010 10:44:55 -0000 Received: (qmail 6350 invoked by uid 22791); 30 Jun 2010 10:44:54 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,TW_FN,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ksp.mff.cuni.cz (HELO atrey.karlin.mff.cuni.cz) (195.113.26.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Jun 2010 10:44:48 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 4018) id A02B2F10FD; Wed, 30 Jun 2010 12:44:46 +0200 (CEST) Date: Wed, 30 Jun 2010 11:59:00 -0000 From: Jan Hubicka To: Jakub Jelinek Cc: Jan Hubicka , Richard Guenther , Jan Hubicka , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Clear DECL_SECTION_NAME during cgraph_create_virtual_clone (PR tree-optimization/43801) Message-ID: <20100630104446.GF12113@atrey.karlin.mff.cuni.cz> References: <20100629185445.GQ25077@tyan-ft48-01.lab.bos.redhat.com> <20100630021255.GE12113@atrey.karlin.mff.cuni.cz> <20100630054936.GR25077@tyan-ft48-01.lab.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100630054936.GR25077@tyan-ft48-01.lab.bos.redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-IsSubscribed: yes 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 X-SW-Source: 2010-06/txt/msg03109.txt.bz2 > On Wed, Jun 30, 2010 at 04:12:55AM +0200, Jan Hubicka wrote: > > > When a fndecl is DECL_ONE_ONLY and has DECL_SECTION_NAME already set (e.g. > > > because of emitting associated thunks), its virtual clones which are not > > > DECL_ONE_ONLY definitely must not reuse its section, because that results in > > > section conflicts. For non-comdat functions e.g. put by user into some > > > special section I think we can just reuse that section. > > > > > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux. Ok for > > > trunk? > > > > > > 2010-06-29 Jakub Jelinek > > > > > > PR tree-optimization/43801 > > > * cgraph.c (cgraph_create_virtual_clone): Clear DECL_SECTION_NAME > > > if old_decl was DECL_ONE_ONLY. > > > > Don't we want to do this in make_decl_local? > > make_decl_local doesn't work on a copy, so if DECL_SECTION_NAME has been > assigned for it, I'd say it is too late to try to make it !DECL_ONE_ONLY > (e.g. associated thunks had to be emitted). > But perhaps it won't hurt to do that anyway. It is given a copy via cgraph_function_versioning Honza > > Jakub