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.133.124]) by sourceware.org (Postfix) with ESMTPS id A489E3858C2B for ; Thu, 20 Jul 2023 17:02:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A489E3858C2B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689872563; 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=hnPuuCKgRAsq3FL1aC7MCdupfrYCviEvKINlWu1lLZY=; b=d7O9BCJkI5PWZZ3wDQEG06xjhN/q1Ia8B8/e3iXFZGxEcW/1OPmjZrDuiObfrBIoqZ3u6y g01Nubd9Ed52DqIgbxLwJW0q7YYeN1dRVzLHwDOWwjRX5INJB50hzLeVIrGOcyMXo7bJSW 692954hm3VcisCr9PgXVroNfMmQuudY= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-50-xShS__38MYiQz7sWiacOtQ-1; Thu, 20 Jul 2023 13:02:42 -0400 X-MC-Unique: xShS__38MYiQz7sWiacOtQ-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-767564705f5so153790985a.1 for ; Thu, 20 Jul 2023 10:02:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689872558; x=1690477358; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hnPuuCKgRAsq3FL1aC7MCdupfrYCviEvKINlWu1lLZY=; b=Nxcnu75D+6schhtv33I1XUxhyvoDd5MzCOjafICz+iiUvp+Cfs5YIku3XrsiWVMAkJ aGJLqQxP5utQZ9qD1HU5ZrepYKOMDDGQxAtC7EgrxgaACsvzSOLE7xaCqIwjArMUcYIA cgOdSbIux9Yzj2raabIe+1BGnk+qVuGhKAQF1YLkTq2OB1sDcQgJDpzLQ9FRPMYAvery iP9SchCi4cE4pARmPmPu1n8dDBvtgnTE4MS79LuUDcViDpSetnmu/OZsxF7safP5zFAW gUuTcvxqtTQexzOxWNGq9N/2bqDObKbR5z+BT8CAb7LkhtsAWK+Q9W1pQ9Fe3zYew2Rd ckZA== X-Gm-Message-State: ABy/qLaXxs/akAS/pxI5oIwAbzAEO42tdsJyDXREPFTtEuRjDY4IQh2A PTRVyj66nEeSbpa3Be0cnf0uX8kIF4ix/LqQHCsCkOkCvDlKyzE7CC16MUqjxgVx1jEgp73RVyL 4dfAJgDDLXwrYv5dl5AHgYd6/1w== X-Received: by 2002:a0c:b211:0:b0:631:f9ad:1d43 with SMTP id x17-20020a0cb211000000b00631f9ad1d43mr9240480qvd.14.1689872558735; Thu, 20 Jul 2023 10:02:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlH+l3dxnAAYwHFNMpi7dDcDuJwou0a6V6kpaNIOLhZ9dYOe+EL+AlNX6bKW9gbkeI78JgYCrg== X-Received: by 2002:a0c:b211:0:b0:631:f9ad:1d43 with SMTP id x17-20020a0cb211000000b00631f9ad1d43mr9240467qvd.14.1689872558444; Thu, 20 Jul 2023 10:02:38 -0700 (PDT) Received: from [192.168.1.108] (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 x20-20020a0cb214000000b00626362f1bf1sm566339qvd.63.2023.07.20.10.02.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Jul 2023 10:02:37 -0700 (PDT) Message-ID: <19b70c99-195c-9be4-da41-8827212a70a2@redhat.com> Date: Thu, 20 Jul 2023 13:02:37 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] c++: passing partially inst tmpl as ttp [PR110566] To: Patrick Palka Cc: gcc-patches@gcc.gnu.org References: <20230719180536.2447863-1-ppalka@redhat.com> <3693e80f-15a9-b20b-a3f0-242395b1d101@redhat.com> From: Jason Merrill In-Reply-To: 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.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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 7/20/23 12:00, Patrick Palka wrote: > On Wed, 19 Jul 2023, Jason Merrill wrote: > >> On 7/19/23 14:05, Patrick Palka wrote: >>> Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for >>> trunk/13? >>> >>> -- >8 -- >>> >>> Since the arguments 'pargs' passed to the coerce_template_parms from >>> coerce_template_template_parms are always a full set, we need to make sure >>> we always pass the parameters of the most general template because if the >>> template is partially instantiated then the levels won't match up. >> >> Hmm, so then my comment "In that case we might end up adding more levels than >> needed, but that shouldn't be a problem; any args we need to refer to are at >> the right level." is wrong for auto template parms? > > I suppose, but only for the ttp case I think? It seems all is well when > passing an ordinary template as a ttp as long as we use the parameters of the > most general template for the coercion. I can't come up with a counterexample > at least. Agreed; the quoted comment is already only about passing a TTP, as ordinary templates always have DECL_CONTEXT set properly. Jason