From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 278873858D29 for ; Fri, 24 May 2024 08:06:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 278873858D29 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 278873858D29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716538026; cv=none; b=bFl21CJH+bRnFDBnwLp/RKz23LgptLrGf/Paoh9tN8GiOAv47vqsOyvXL3MBbEADg/bflwi2f36wLD8BdvXHHwvX2Xeq1PDp7s7ZW9blvXutaK8Z6gGgsvSnMuhwoWieD2EkjPj0opSGJLwj4mnOIOFFMzkSOMjhuJxRLyPdr/Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716538026; c=relaxed/simple; bh=VbP6TsWHrN0OzllPK08dQi9BpRBAYYShuBR9MQYgkNo=; h=DKIM-Signature:Message-ID:Date:From:To:Subject:MIME-Version; b=qLojDuYhqxAKf4SNdQ11Nqdv6MWnBNcUZXpEfXfhrvMDqtE6wrI2SCLa4N2G944dpdTsmjoeXVaZeoEERTqTDobxqR//fsp916RQBUOwkE1+9ulWcq88ak09QxE5cxHIbUR8vozsf4oAa0MN1yamEPtWA5guHLtqqNp+YF0VHns= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1f33d84eaefso12729645ad.3 for ; Fri, 24 May 2024 01:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716538016; x=1717142816; 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=3D3TUemtLNfcGk8XeG4FhGulopHToRN9kbn14mpPMII=; b=m0vyjYUmtFRFg11kbwmMFeJEmNjJMHnrWSLu12KpPA/j9m9kz9N9nXADOQB93w7V4M EbKAuMZF7ijKnavz0opGsEOv+bo00DdZep359XH08DcYxassWh6kcv2B7zCTEh9R5ztZ MVuJJd1TeTiY2XmhiySSDijTVyTBA2PneKx0B3XHqNK+rvbJ2AtN38phb6hoRClUm7Ck k5/OgFRwQWz9duMTokGZUd0Jeg+xAm+1KfR+2JILqUAA0HpXfNUngaswgSDxxAxrgbRQ 7ZJajOA+8OXjFoDt7zdgnq7bYladOBrgcuLvYVKZdyyBbbFW8TKP+KuERv+cdUyr1LEu S3gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716538016; x=1717142816; 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=3D3TUemtLNfcGk8XeG4FhGulopHToRN9kbn14mpPMII=; b=hRaR+kJigswHhFIDEzRFDnzgjRhnMHc7KrPJknkvxcRj2ctRT/60P9piI8z0RCojIn 12rKH6+3Fl2xvSQ3lck1hFBRfunA5prgchKTJbFYbbBdmy18Ajf1RRImi4yPw5oGmKjg siFsf3N1EPPl2Y7KzrB5WjMyanekQarxhsbXHODgMbHYy3gWE+K+idJUg0LNZkH3PmZy 3ZgVZ6RqA9Qor+voI2vhp4Rk6d9FzkT+Fgb0OnF1pXgHE3jz+NrrWW7CqRWWFEUoOcnZ HjT8HGJcQt4V554+mzjyAP3cG+nuSKRSTu6yXovmdG0QOR/2J3VQBsSqrDjZ4m7+gjkR xqyQ== X-Forwarded-Encrypted: i=1; AJvYcCVLfydqaa8E2KDVeePXnprT+5g4s71R3+2mycvfgsRqnZzodHs89kax0knFmp/DhDZmpRxcFhsxvYYnEl8gf/1ICj96NVD1Gw== X-Gm-Message-State: AOJu0YxApw0mmWA3bXt3JEF6IbI9W+EayDYCDNXrvOu2sp4AfuHC0AVC 4ONjqrUtgt779Modq5NT/WzPdHO5jYJ4tPSZ8TppJrvrHdK7Xwg9 X-Google-Smtp-Source: AGHT+IG3GWgrboH4JiT3IiVPd8bQLumBhWhsV0Ecl+aBXDP8UECzB5oCz0TKc9WM3u09/WiBcId63w== X-Received: by 2002:a17:903:230a:b0:1f3:1afd:b150 with SMTP id d9443c01a7336-1f4486ed41dmr24769675ad.19.1716538015948; Fri, 24 May 2024 01:06:55 -0700 (PDT) Received: from Thaum. (14-200-72-253.tpgi.com.au. [14.200.72.253]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c7d1b46sm8072345ad.110.2024.05.24.01.06.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 01:06:55 -0700 (PDT) Message-ID: <66504a9f.170a0220.406f9.228b@mx.google.com> X-Google-Original-Message-ID: Date: Fri, 24 May 2024 18:06:50 +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: <66014130.170a0220.d7c40.0e9b@mx.google.com> <661cb2d3.170a0220.c9922.173d@mx.google.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.9 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 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. > > Jason > 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? Nathaniel