From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id 19DF73858CDA for ; Thu, 30 Mar 2023 11:54:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 19DF73858CDA Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=none smtp.mailfrom=kam.mff.cuni.cz Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id AC00728A448; Thu, 30 Mar 2023 13:54:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1680177257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xk/Hq1ByESZAPToOMEu8HMY4Y3TwHWzp5PXmdDcxxp0=; b=atu0UgUojGYck7ghrX5IYeGtODZy2rx75IqyqHJuSwezVnStTWT1Zt2E1GCmbyect7Z9/2 Np7eQqionYweB3PoE11jFzguV0blC1s/4kfPVIjXVsIjHGTNqhlQ5g+LSGYsEysTUZmu0e BNlKZgQcUkRcMeY73WMc+wIh6Z3p1pg= Date: Thu, 30 Mar 2023 13:54:17 +0200 From: Jan Hubicka To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH RFC] c++: lambda mangling alias issues [PR107897] Message-ID: References: <20230308025945.648936-1-jason@redhat.com> <4d1a02da-b1b5-1cdb-c435-ba0299d8bd9b@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > > How about moving it to symtab_node and using dyn_cast for the cgraph bits, > like this: > From 1d869ceb04573727e59be6518903133c8654069a Mon Sep 17 00:00:00 2001 > From: Jason Merrill > Date: Mon, 6 Mar 2023 15:33:45 -0500 > Subject: [PATCH] c++: lambda mangling alias issues [PR107897] > To: gcc-patches@gcc.gnu.org > > In 107897, by the time we are looking at the mangling clash, the > alias has already been removed from the symbol table by analyze_functions, > so we can't look at n->cpp_implicit_alias. So just assume that it's an > alias if it's internal. > > In 108887 the problem is that removing the mangling alias from the symbol > table confuses analyze_functions, because it ended up as first_analyzed > somehow, so it becomes a dangling pointer. Fixed by clearing various flags > to neutralize the alias. > > PR c++/107897 > PR c++/108887 > > gcc/ChangeLog: > > * cgraph.h: Move reset() from cgraph_node to symtab_node. > * cgraphunit.cc (symtab_node::reset): Adjust. > > gcc/cp/ChangeLog: > > * decl2.cc (record_mangling): Use symtab_node::reset. > > gcc/testsuite/ChangeLog: > > * g++.dg/cpp2a/concepts-lambda3.C: Use -flto if supported. > * g++.dg/cpp0x/lambda/lambda-mangle7.C: New test. OK and I apologize for the delay (my travels were more busy than I hoped) Honza