From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 05928385840B for ; Fri, 24 May 2024 13:54:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 05928385840B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 05928385840B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716558877; cv=none; b=yGlgJI4HVdkeaUxeIExswTx7YKUVofxzk99XjulMC2khpAN4rlHdSuo5JIlaBtYdztX3shsuCPJoaFhwhRjGahHQ1ZM+bchUyfsZbXLYYWgQIF23fnFWlwYx/ZetY0YHlaabHaKSD8TY0iZ/Pwn4oDfeb6B6HlII/ZMUsmYbz00= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716558877; c=relaxed/simple; bh=EeERPFvNUSCNH2ON2XVpjtZ8a+f9x0h2soRJIJlTKyQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=asaXHQg0ca35hsLmUp3S2DE6RuW1nygtbhpWyZYcYwT/Le9nP5ev2Oq8pcRXX4cWxpTu9s0VCVVPdVX9sJZ6DtLxcJVFj/Jnua0PZ0SucN9rOUGKJlTCEk/yU0aqDkyXu3B+XZxtVG2DKxuwS+CakAio4vEvs5mie2AJyjiQZcM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716558875; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4/4cCYrQEqX8TcmGJAoEHIlRLHeEItdJ+AlnS2BsgD8=; b=by06XjsAxdEDUPc3r0g53vzWyIvm6AapumjqIcVe+L/Enjlk21OmQjyFbOloBRTdwuUbYg UB+3PMtEfwpb9i4D/fJlIywb6MhYaFMZ/oQlSwwuqz+GpyBmbDRP7waKLWsOKz7XI6pc73 O4Lb5SjUU1ILHJRO0GDbNMP+CRvWAWo= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-621-Hb3M0go2MS-t2g2m-ZapsQ-1; Fri, 24 May 2024 09:54:34 -0400 X-MC-Unique: Hb3M0go2MS-t2g2m-ZapsQ-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-43e4454be9fso14240971cf.0 for ; Fri, 24 May 2024 06:54:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716558874; x=1717163674; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4/4cCYrQEqX8TcmGJAoEHIlRLHeEItdJ+AlnS2BsgD8=; b=Rb/pab/3skGn3vXNfBXtroa84Xm0gKGD2ANWRk6KYY5QNBWAeh57w6loGb+QWRtUWM CAv5iHQgjbOsmibK1RU4gL7yTHc/HSuXOGU7m2UgEHSkmsPlZDCSwIXwW2DHOodxBjY/ Vx7+EjDW25MT9oJLlGhmbiPpnRpkwJA3w4wd/Y4XYsCQhIvAJVy2fraAdgiTB81yO0+Y 8FKuBGzzxHNLLdfjJf6euHxecdXC42SJAU/PWYAJdXYv3u+BBhlZU7DRhwjygs9ENzw7 VEsZM+tBKNuipcpuXsp1y+bHJjPr+OwTr72w7bRmfwOZaD7211kPBhNeCsicPfzXMMXj pQ5w== X-Forwarded-Encrypted: i=1; AJvYcCUOGHhFZ9iEHRd9+FkgpNqIH0TVkDDwJm86XW2Wf+M2e1I5EZIJ8IRgVFvMk9GPOE3PHUMGzRbLLkIYVEtfv8uFzsElMhKpzw== X-Gm-Message-State: AOJu0YyLwVbJX1q+zoqR8EGZN22SctlZgr1bloFrZggjVz9ZU8Nm5qW/ WKSllJ7tfCZmDX7kRBnFLMF2ZXRD09d/uSrsZOSr3VZXUyWbrvOnL0LcJb23b6FW9qS0mT3yLqp QM+vwQZDCHxEoIHwhjwuRxkWC31AsLUSfJP6rEzX/d8jFAz2edxuHa4s= X-Received: by 2002:ac8:7d49:0:b0:43a:3505:53d8 with SMTP id d75a77b69052e-43fb0e49207mr20952431cf.1.1716558873673; Fri, 24 May 2024 06:54:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESXHhbZ8fh8K6YA6XFKxbCk7VuSVLxmaPLiO98ypCGsiT8m9y1X/dTlpyRQ8X8Teyp3h7EhA== X-Received: by 2002:ac8:7d49:0:b0:43a:3505:53d8 with SMTP id d75a77b69052e-43fb0e49207mr20952201cf.1.1716558873217; Fri, 24 May 2024 06:54:33 -0700 (PDT) Received: from [192.168.1.130] (130-44-146-16.s12558.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.146.16]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-43fb809afa2sm727451cf.19.2024.05.24.06.54.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 May 2024 06:54:32 -0700 (PDT) Message-ID: <392f6ccb-2b2e-430b-b972-9c331aa51445@redhat.com> Date: Fri, 24 May 2024 09:54:31 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH][14 backport] c++: Fix instantiation of imported temploid friends [PR114275] To: Nathaniel Shead Cc: Patrick Palka , gcc-patches@gcc.gnu.org, Nathan Sidwell 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> From: Jason Merrill In-Reply-To: <66504a9f.170a0220.406f9.228b@mx.google.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 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