From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id BDF693858D39 for ; Wed, 28 Dec 2022 09:20:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BDF693858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A9B1F21A96; Wed, 28 Dec 2022 09:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1672219226; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ICAgJMS9DGDUakAZfc7juRAslRA8diVBqD/vch9psGg=; b=guDZgN+5oXO1reuVlTDrDxXlYa60oROsufCyVuk2p+z85yKSaeT133S55LqN+PSaBQ5I8Q lbMnlABeV+8oZrMYakYv6tQ6dFqPu3nfFlwUVMnWeLR0oFfAoAYzqi+xbdATpxPJ7a68mc PGDqkASYUUwvj3KDBGYizHk13xO4iJo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1672219226; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ICAgJMS9DGDUakAZfc7juRAslRA8diVBqD/vch9psGg=; b=tlvSZBM8tFKxnnLEwnDDAX2Zgc6ksnetrazwnWwHMEFHlYWGo08LcURd0I8dv+ZwUCiJlP glPaTXwa83FUFLAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 95A87134F5; Wed, 28 Dec 2022 09:20:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gVuHI1oKrGMaUwAAMHmgww (envelope-from ); Wed, 28 Dec 2022 09:20:26 +0000 Message-ID: Date: Wed, 28 Dec 2022 10:20:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] IPA: do not release body if still needed Content-Language: en-US From: =?UTF-8?Q?Martin_Li=c5=a1ka?= To: gcc-patches@gcc.gnu.org Cc: Martin Jambor References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: PING^2 On 12/9/22 09:28, Martin Liška wrote: > PING^1 > > On 12/1/22 10:59, Martin Liška wrote: >> Hi. >> >> Noticed during building of libbackend.a with the LTO partial linking. >> >> The function release_body is called even if clone_of is a clone >> of a another function and thus it shares tree declaration. We should >> preserve it in that situation. >> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >> >> Ready to be installed? >> Thanks, >> Martin >> >> PR ipa/107944 >> >> gcc/ChangeLog: >> >> * cgraph.cc (cgraph_node::remove): Do not release body >> if a node is clone of another node. >> --- >> gcc/cgraph.cc | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc >> index f15cb47c8b8..2e7d77ffd6c 100644 >> --- a/gcc/cgraph.cc >> +++ b/gcc/cgraph.cc >> @@ -1893,7 +1893,7 @@ cgraph_node::remove (void) >> else if (clone_of) >> { >> clone_of->clones = next_sibling_clone; >> - if (!clone_of->analyzed && !clone_of->clones && !clones) >> + if (!clone_of->analyzed && !clone_of->clones && !clones && !clone_of->clone_of) >> clone_of->release_body (); >> } >> if (next_sibling_clone) >