From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 24D863858C48 for ; Fri, 24 May 2024 14:40:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 24D863858C48 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=googlemail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 24D863858C48 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716561609; cv=none; b=Z8zrlYbufCzdcRPI1hnqs//Aq+EivXzsTykFv+F8eaupat/rL66SaW9TTCdpkwkF3pr3QpAg/WO8bb8FVJm41sJTNbbg1mHJl9UH+fwzaJHPdmAr/RJUeqwAW5gR1vELDGleZeBMzGEolSo47DP+7NDTgKutCE6BDYOf0Ldj8N4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716561609; c=relaxed/simple; bh=oYWMz0E7+5WPgoTt83KX9XCMPfm3RBiguuYFIPhowK0=; h=DKIM-Signature:Mime-Version:Subject:From:Date:Message-Id:To; b=WLa7ucUnyFL0yBpfJ6Rx+p0hVUlmraiWWlSjHz8Hce8+7+zxFiMj5l1LoJFW7PbiOmBYTEghfNwSH8Ethh2e4dRzCcesS6jHU7eBjgLWxY5sG1HvYz74FLjM6YtcZxPzLc9B/WNcKGZn0wxaMs1hxPHEn6Ngg9caQ8HfxJD9CSk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42101a2ac2cso18904855e9.0 for ; Fri, 24 May 2024 07:40:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1716561605; x=1717166405; darn=gcc.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KaGMDif4MIwEmTmaxr/g3r1Z7VYXh8NSBBF+JpCAg08=; b=OmTKZ3fXt6qCkUXUMsfZZh7qYO1jU8kKOQqspY8lSC734vd2abwEPynqB3bkVoW7iC dZYPykTh/8qe8gyGnsfT8NNeq6HhDv9S9i1t3QuddZy4HX0xN7UfkpDGZ7ZMGlfjDiJ/ 5tTk2GFZkHfbOOkQ4Xn2bOsiINlkPMuHTk2aesB2oqu3RNglDdOy6gDbftqEaTbcDzss GbcvFGOM/P2hac5jSvH0SJyHW5mhX+XSCCXvVpgsuaWv8mltDD4y3f+IdHI+TY4DKi0H Y+NaWwekYXXrK3uKe+Tw81WDO0npy/kAeHoAZv1t/MNlkieKLNmEPPkEezYQ4bY944vL ePJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716561605; x=1717166405; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KaGMDif4MIwEmTmaxr/g3r1Z7VYXh8NSBBF+JpCAg08=; b=Q1NveTt8h1lzOcvoPSeigzLY7g080aBnYn52b/0fHYdy2avXcGNmijXlEjlo0f0zih y8+UfQYxFLVq/K7TQD5fLExynpd84sCsTm3fSxSU95B7yea0U8cLMQFevLUNyppDz4jk C1RQ46CeLlqPYRxT+xOnc72OTfKlFF0Z0soStW3daiO0KMb2yZWpe04zOA8iBgsi2cKv tLhez2vFZLmVExQ/IbbgFf30ucZxNnsuvpJW9vIT+gggDFFpVQds2kACcT5MW0XI/SPd rHCUrOyjxXRdG71bsanm3sxkeGciM7U3vaROU8ESwBa7234aFh4fs9rKiZxDFLSb41uD cRRQ== X-Forwarded-Encrypted: i=1; AJvYcCWihI10ybBmINMk5KDCKH7Tg/lnN2cgY5YTtgvkHZrCDJV4oZ47R1q4wi8coiH50HN2J1sTfzsVnxcbB/eTF5oSoUVoNp0/dw== X-Gm-Message-State: AOJu0Yy/pQP78+p6VVn3Zi5Y4XIboaU9azTsfezhMFq+HRtpDBI2koFX kSAA+H9+8KYsK5NjfZ1WQggw06n/1ofkzn7HRwZprPahwWt2NGDS X-Google-Smtp-Source: AGHT+IHRRKRujjHT/xlGw3u2KaTl0btLQRc7qhXWaMjxSb853GGIeIp26TKIXXBsvpK+JuJ4IVJNUQ== X-Received: by 2002:a05:600c:314c:b0:41c:5eb:4f8f with SMTP id 5b1f17b1804b1-421089d7c33mr20089045e9.15.1716561604580; Fri, 24 May 2024 07:40:04 -0700 (PDT) Received: from smtpclient.apple (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-42108970967sm22648405e9.17.2024.05.24.07.40.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2024 07:40:04 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: [PATCH][14 backport] c++: Fix instantiation of imported temploid friends [PR114275] From: Iain Sandoe In-Reply-To: <392f6ccb-2b2e-430b-b972-9c331aa51445@redhat.com> Date: Fri, 24 May 2024 15:40:03 +0100 Cc: Nathaniel Shead , Patrick Palka , GCC Patches , Nathan Sidwell Content-Transfer-Encoding: quoted-printable Message-Id: <8FA6E0CB-F7E1-45D0-B062-851A176CCBA8@googlemail.com> 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> <66504a9f.170a0220.406f9.228b@mx.google.com> <392f6ccb-2b2e-430b-b972-9c331aa51445@redhat.com> To: Jason Merrill X-Mailer: Apple Mail (2.3696.120.41.1.8) X-Spam-Status: No, score=-2.5 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 24 May 2024, at 14:54, Jason Merrill wrote: >=20 > 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 !=3D 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 =3D friend_tmpl; >>>>>> + elt.args =3D CLASSTYPE_TI_ARGS (TREE_TYPE (tmpl)); >>>>>> + elt.spec =3D TREE_TYPE (tmpl); >>>>>> + type_specializations->remove_elt (&elt); >>>>>=20 >>>>> For GCC 14.2 let's guard this with if (modules_p ()); for GCC 15 = it can be >>>>> unconditional. OK. >>>>=20 >>>> 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? >>>>=20 >>>> Or should I keep it as two separate commits to make the = cherrypicking >>>> more obvious? Not entirely sure on the etiquette around this. >>>=20 >>> 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? >=20 > I was thinking >=20 > (cherry picked from commit aaaaa and bbbbb) For the record, I do not think the git hooks with allow that exactly = (or, at least, if they do I did not find the right syntax); what I=E2=80=99ve done in similar = cases is to keep the main =E2=80=9Ccherry picked from=E2=80=9D line for the main patch and then = add text to the intro section saying that xxxxxxxx and yyyyyyyy are also included. Iain >=20 > but the exact format doesn't matter, just looking for a mention of = both commits. >=20 > Jason