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 341893858D38 for ; Mon, 6 Feb 2023 17:26:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 341893858D38 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=1675704362; 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=wY4IwqN3NbvfHKrPrjQh6qNrMKQv3xRx9RCbqX39U48=; b=fBiuUfMzlLuPNT+1+x3xdYKk+LstfXQUftFgFunEb22zosdfUNzJvJGYQHvd66tvXXb9nS rrnK09KvlMypaf1al4dDfQsbw9amvdQbyhZmgXGgA4U21u5zi7NNupmi9565WFhRAnUa6S C9aOldk3HqpaaIrnsIRla2cd/Ettlnk= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-511-H8neWFSFMhW0ZiqpVkLqIA-1; Mon, 06 Feb 2023 12:26:01 -0500 X-MC-Unique: H8neWFSFMhW0ZiqpVkLqIA-1 Received: by mail-qk1-f200.google.com with SMTP id ay10-20020a05620a178a00b0072db6346c39so6926366qkb.16 for ; Mon, 06 Feb 2023 09:26:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wY4IwqN3NbvfHKrPrjQh6qNrMKQv3xRx9RCbqX39U48=; b=MchcpeNVYSMWwU+wJkYZN18Rt0nO0lwdCTfonYI6zTzSg95ZMlIOQMaL3vU1eI794v Z3XNHPH1rETekmA8q6+xAXoUqEYsP81sKpAyHmJ+dGBiesFaQm7j/tWN9KQF5ysf3zAJ onsyIgHGl+qE11yLeFstU8wQiT4hZ/4WGA55KCca7hqB7k1mX83Z/fnl/jO3HiM70Px1 y1o7CXy849PWytLGgU0iWyxzHUN4kDeCS6GKvdn+R0/jMLNrzVPloRsKcl6FYd13o6/5 kKIS65m79/3hHkwf/84le1VTTJVgIdESNNGzyuIINRPH9dn8Tc2xruaHjhqeFkbdE3l+ YDWw== X-Gm-Message-State: AO0yUKWOMin02V8wRvt2BbvjniQE3ez89/lM+vheMN/SAab5L8B1R9bo 8mxjXufcbszhWY11LVHn62zpPk5jYxRL2KJW/2bpW5ZuSfqroPUEnD29AByAIBPadw9WAhbZUY+ eySNUFtwKQ4HEIgvdMw== X-Received: by 2002:ac8:5dcf:0:b0:3b8:674c:6c18 with SMTP id e15-20020ac85dcf000000b003b8674c6c18mr19884qtx.45.1675704361312; Mon, 06 Feb 2023 09:26:01 -0800 (PST) X-Google-Smtp-Source: AK7set+25xJc1eCAQEZySpffgAGMdM4xKu2qXRAIlQK2Z3hcY2P1cg8wjIM1m2BFh7BjcGx/+EQNHQ== X-Received: by 2002:ac8:5dcf:0:b0:3b8:674c:6c18 with SMTP id e15-20020ac85dcf000000b003b8674c6c18mr19867qtx.45.1675704361093; Mon, 06 Feb 2023 09:26:01 -0800 (PST) Received: from redhat.com (2603-7000-9500-34a5-0000-0000-0000-1db4.res6.spectrum.com. [2603:7000:9500:34a5::1db4]) by smtp.gmail.com with ESMTPSA id br15-20020a05620a460f00b00706bc44fda8sm7735012qkb.79.2023.02.06.09.26.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 09:26:00 -0800 (PST) Date: Mon, 6 Feb 2023 12:25:58 -0500 From: Marek Polacek To: Jason Merrill Cc: Patrick Palka , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] c++: equivalence of non-dependent calls [PR107461] Message-ID: References: <20230204203126.782976-1-ppalka@redhat.com> <3f14f800-4b00-9215-c249-1c7f19d43560@redhat.com> <9b958e6f-6f8b-9183-5277-39f83871dd9d@idea> <0e0bc838-466e-20ea-4523-a075be14ef76@redhat.com> <03f75252-861b-528e-df42-6a88adddb388@redhat.com> MIME-Version: 1.0 In-Reply-To: <03f75252-861b-528e-df42-6a88adddb388@redhat.com> User-Agent: Mutt/2.2.9 (2022-11-12) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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 Sat, Feb 04, 2023 at 06:02:46PM -0800, Jason Merrill via Gcc-patches wrote: > On 2/4/23 20:41, Jason Merrill wrote: > > On 2/4/23 20:08, Patrick Palka wrote: > > > On Sat, 4 Feb 2023, Jason Merrill wrote: > > > > > diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc > > > > > index 255332dc0c1..c9360240cd2 100644 > > > > > --- a/gcc/cp/pt.cc > > > > > +++ b/gcc/cp/pt.cc > > > > > @@ -1841,6 +1841,7 @@ iterative_hash_template_arg (tree arg, > > > > > hashval_t val) > > > > >        case CALL_EXPR: > > > > >          { > > > > >        tree fn = CALL_EXPR_FN (arg); > > > > > +    if (TREE_TYPE (arg) == NULL_TREE) > > > > > > > > How about changing dependent_name to take the CALL_EXPR rather than the > > > > CALL_EXPR_FN?  That would mean some changes to write_expression > > > > to move the > > > > dependent_name handling into the CALL_EXPR handling, but that > > > > doesn't seem > > > > like a bad thing.  Other callers seem like a trivial change. > > > > > > Indeed changing dependent_name seems best, but I'm worried about such a > > > refactoring to write_expression causing unintended mangling changes at > > > this stage.  Because it seems the CALL_EXPR case of write_expression > > > isn't the user of the dependent_name branch of write_expression, at > > > least according to the following patch which causes us to ICE on > > > mangle{37,57,58,76}.C: > > > > Yeah, I tried the same thing.  Maybe for GCC 13 better to add a new > > function rather than change the current one. > > mangle76 seems like a bug where we're producing (and testing for) the wrong > mangling -- mangling (*this). that doesn't exist in the source. clang gets > it right. Yes, this is https://gcc.gnu.org/PR98756. > mangle5{7,8} has the right mangling, we're just using dependent_name to > mangle function names that aren't dependent names (because they're template > arguments in both cases, and qualified in the latter). Marek