From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 2C464385840B for ; Fri, 24 May 2024 14:21:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2C464385840B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2C464385840B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::434 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716560471; cv=none; b=Cs61yGojKJvxJeE+WXYg8VLNvfdlt0cQIXlXR3rvHphX/HrkxESeSwIv+8UfV+wtYDXZdV+nUYbZJUhcdYaFzuj6dpT0gzx2WS7NXuSaiEeSX77MB0v2X4TRKBTt2Sw4q90TB9ou5n3YzbVHLoeOvo7hfGXIbLiesVFvMeuBQRQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716560471; c=relaxed/simple; bh=vfkDR63Px4th6F3tgIGIqDw9N/Ydvg9CfF/Q9kkmZs8=; h=DKIM-Signature:Message-ID:Date:From:To:Subject:MIME-Version; b=ueOT4OlOixsBMNO/O3LMnBMJYFAmFSHOP2upC12lDueoqc4vTwVmBRakiISLRxRuqRcNCt4z0D9ymyax1kHOeWuebFbFG1sppZu/EboL+jz608lZFNDOvtsDuRoOfDBoiT/Wt4mUQxLkhVcC9SIzT6heRaTuryU1acatGni+Z98= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6f8edddf756so793523b3a.3 for ; Fri, 24 May 2024 07:21:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716560468; x=1717165268; darn=gcc.gnu.org; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=OmvPZPvZJLqPtLL4c6/yxIK9P0NdHPY++G9p5kmRlhE=; b=nJq8H6iKCmRKn008P7dp6+U2CmCkLoppWiDnesLerQF1/a2M1+nqBc2KUaOq9JWQbA FaIJ8L8Z8g2KXGRQGrwSbgP0YDqHSE7hCn6uK7Jyr6hCdwJNKO19Dpl66tIPQMpLQPWS SDaQuq8XWYMjCV27VmcBvIca1LRk2kgav02BSZVXSoAvDHtsTzcHkmZRE3j6i+OiROvg 4XPWnzPrigOXKjPTctPzJZ+xF05MVJQVgnJc7nCpk9s/RQTSlb1ZRoXMbdQgU659wMOR DPC6xeZxQ9vnQfJylqmIFSeYdbLOLy5KYK6Cz4MMy/3gt2EV8pPCfC78lTP8Rg5Un3B6 h5bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716560468; x=1717165268; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OmvPZPvZJLqPtLL4c6/yxIK9P0NdHPY++G9p5kmRlhE=; b=eMXXuqkKJd4/zQzrR9CtyY8zMM7hzhHt3c8nyJd1ni9p2FUDCC2Jst74STihdmNx1j 7HVPvHnWW/WCIP6RL6kSedBJywGbAA6ZqG685Gyhtn5hjSDhBVdkfIjFsaggdXm/5sqd wVizCB+9BlZW1UA0JZRFFZbpyTZ7tgRXFVUUnhKfD2ZjEcNk6hB2vnFBATww4BFff0sO 2q2HhXOzdFr4Y6DlMKe8Fmd59tTXDf8SzXdCA8huNrp1IQTAWN1fC5BFgqfj8N9eZdtF L9sJ/+Bqk3tQiKnuqImeQbGXXW0iNTwUwmKTTNcL0j3zwJd1fwVNM5/LB7hO9nMX53x1 pxMQ== X-Forwarded-Encrypted: i=1; AJvYcCWiVi7J9nrWe0p4ru7AqoQPKbPcL6Jqj4WNFqqAlhMfGNUTyRxwhpuCcUtp9GG0++Jl+KU1wjPuNePwczLsLs9E1hjicypUxQ== X-Gm-Message-State: AOJu0YznAAkT/DzJC0jONoAXITQvYIkk9z1B9VjSCo7bYhD/KPIi2Lf9 aZRX391pfSEzjGgeU+vfBHmgprbVh30qLeKPGAtrrNymWKwrNbJu X-Google-Smtp-Source: AGHT+IFVDZDfy7t3RaYq9QKscl7EJpEPsgNNcEmkx91VEOwTuBfXCMB5p7Y98pfogZoGWi8nGNqJAQ== X-Received: by 2002:a05:6a00:2917:b0:6ed:21c0:986c with SMTP id d2e1a72fcca58-6f8f3b3e064mr2946836b3a.24.1716560468002; Fri, 24 May 2024 07:21:08 -0700 (PDT) Received: from Thaum. (14-200-72-253.tpgi.com.au. [14.200.72.253]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fd4d878esm1162458b3a.190.2024.05.24.07.21.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 07:21:07 -0700 (PDT) Message-ID: <6650a253.050a0220.922a2.2e0b@mx.google.com> X-Google-Original-Message-ID: Date: Sat, 25 May 2024 00:21:02 +1000 From: Nathaniel Shead To: Jason Merrill Cc: Patrick Palka , gcc-patches@gcc.gnu.org, Nathan Sidwell Subject: Re: [PATCH][14 backport] c++: Fix instantiation of imported temploid friends [PR114275] References: <6621d375.170a0220.8591f.8217@mx.google.com> <66229bfe.170a0220.d023c.cb93@mx.google.com> <662f69c6.170a0220.d3cac.81f9@mx.google.com> <66420006.170a0220.4a5f3.40ce@mx.google.com> <66504a9f.170a0220.406f9.228b@mx.google.com> <392f6ccb-2b2e-430b-b972-9c331aa51445@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <392f6ccb-2b2e-430b-b972-9c331aa51445@redhat.com> X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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: On Fri, May 24, 2024 at 09:54:31AM -0400, Jason Merrill wrote: > On 5/24/24 04:06, Nathaniel Shead wrote: > > On Thu, May 23, 2024 at 06:41:06PM -0400, Jason Merrill wrote: > > > On 5/13/24 07:56, Nathaniel Shead wrote: > > > > > > @@ -11751,9 +11767,16 @@ tsubst_friend_class (tree friend_tmpl, tree args) > > > > > > if (tmpl != error_mark_node) > > > > > > { > > > > > > /* The new TMPL is not an instantiation of anything, so we > > > > > > - forget its origins. We don't reset CLASSTYPE_TI_TEMPLATE > > > > > > + forget its origins. It is also not a specialization of > > > > > > + anything. We don't reset CLASSTYPE_TI_TEMPLATE > > > > > > for the new type because that is supposed to be the > > > > > > corresponding template decl, i.e., TMPL. */ > > > > > > + spec_entry elt; > > > > > > + elt.tmpl = friend_tmpl; > > > > > > + elt.args = CLASSTYPE_TI_ARGS (TREE_TYPE (tmpl)); > > > > > > + elt.spec = TREE_TYPE (tmpl); > > > > > > + type_specializations->remove_elt (&elt); > > > > > > > > > > For GCC 14.2 let's guard this with if (modules_p ()); for GCC 15 it can be > > > > > unconditional. OK. > > > > > > > > I'm looking to backport this patch to GCC 14 now that it's been on trunk > > > > some time. Here's the patch I'm aiming to add (squashed with the > > > > changes from r15-220-gec2365e07537e8) after cherrypicking the > > > > prerequisite commit r15-58-g2faf040335f9b4; is this OK? > > > > > > > > Or should I keep it as two separate commits to make the cherrypicking > > > > more obvious? Not entirely sure on the etiquette around this. > > > > > > It's OK to squash them, but it's typical to use -x (directly or via git > > > gcc-backport) to mention where a branch change was cherry-picked from, and > > > in this case it would make sense to edit in the second commit so it's clear > > > the backport includes both. OK that way. > > > > Sorry, still a bit confused :) Do you mean to merge the two commits > > together such that there are two "cherry picked from commit ..."s in the > > commit message? Or just list second commit, and mention that it > > includes both in the commit message? > > I was thinking > > (cherry picked from commit aaaaa and bbbbb) > > but the exact format doesn't matter, just looking for a mention of both > commits. > > Jason > Thanks, pushed as r14-10240-gfd6fd88b1a93f4fb38f095688255ab5c00122810.