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 00DEF3858CDB for ; Fri, 7 Oct 2022 15:22:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 00DEF3858CDB 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=1665156175; 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=/nIudq5YpxZ4nf6UUMP0WvBqyrvQBlmRFLO2HIG1CCc=; b=K/WkKvtfgOjTV5de3nhfUc+6z1MnjveKf4LKSBuR4PxoxJOpvlD3C3g5PyCQDpIApOEKZ2 q3eT9elXh09Xkp0XpvcAHgLe0HCcy0/D3nhXiAezLyh8EL1vl+V/BxO88/ZmIHCuuXrYeJ dOHnR/QwuopuWFhJK0omj+guWrRznBU= 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_128_GCM_SHA256) id us-mta-654-IaNUkNyaPnWFzIEbvZkfEA-1; Fri, 07 Oct 2022 11:22:54 -0400 X-MC-Unique: IaNUkNyaPnWFzIEbvZkfEA-1 Received: by mail-qk1-f197.google.com with SMTP id bk21-20020a05620a1a1500b006be9f844c59so3967694qkb.9 for ; Fri, 07 Oct 2022 08:22:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=/nIudq5YpxZ4nf6UUMP0WvBqyrvQBlmRFLO2HIG1CCc=; b=tvX430esUlHMkYBF5aqaKFKrNCIBrFb/z4IpkZ+ldItV+wOKtcuwPr5g3/dX4ZZO8y rroeLBt/F0x4qimp111CjbU7QRNZ1ZqT/zFA1m7R/Wvw9vmmnicI/mMgNTVxsWfjaXvZ BwB3BMlKB4P0lwXUrNdWoR53q1r4jNQBokKz5RdbflLlSeLH7zC9pvuGyC9tKfuxfpzj Uu/F2UfeTlIGOcrbeOAfbv5XjAUGVkyfFYFUAaoFubaLf/zFXwmKStYMecAEk/pl6a1y tMwgbm6gbHm02shvmd/K6/3zUkE1SSsJmAHRm0zzIUTBmFTxV4N/xSWs1a+XZgXzYLSS Czuw== X-Gm-Message-State: ACrzQf1mvQgGlISuIgXtTpfiAO+O02PnSV6WALemVUbTh5TgfdsuSar4 36n5gUR30xIz7smUJ3QsPdTvD4aPCCBnDN5IqQfQ5Ava+glg9u45UhXoYuXUOPd5/dGFSzTOfoZ wg52F+wfQLhk/53ragg== X-Received: by 2002:a05:620a:4252:b0:6d8:9682:c490 with SMTP id w18-20020a05620a425200b006d89682c490mr4041410qko.4.1665156174305; Fri, 07 Oct 2022 08:22:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4428MdGgFw/wAaCE8zmCt62BN7dqaRE5Loq9gDAQJEBC9GpRuPsB/VT6lbDRVjxm/mmchQpw== X-Received: by 2002:a05:620a:4252:b0:6d8:9682:c490 with SMTP id w18-20020a05620a425200b006d89682c490mr4041391qko.4.1665156174049; Fri, 07 Oct 2022 08:22:54 -0700 (PDT) Received: from [192.168.1.101] (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id bx15-20020a05622a090f00b00396665398ffsm1326643qtb.86.2022.10.07.08.22.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Oct 2022 08:22:53 -0700 (PDT) Message-ID: Date: Fri, 7 Oct 2022 11:22:52 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: c++: Lambda context mangling To: Nathan Sidwell , GCC Patches Cc: patrick Palka References: <44fbc15f-6f48-94c0-a51a-e5b99190ffbc@acm.org> From: Jason Merrill In-Reply-To: <44fbc15f-6f48-94c0-a51a-e5b99190ffbc@acm.org> 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: 8bit X-Spam-Status: No, score=-8.0 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,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 10/7/22 08:27, Nathan Sidwell wrote: > VAR and FIELD decls can become part of a lambda context, when the > lambda is 'attached' to that entity (It's a C++20 ODR thing that was > discovered with modules, but is actually separate.)  We were not > marking those decls as substitution candidates, leading to demangling > failures and compiler variance. > > The alternative I chose is to bump the ABI, and add them to the > substitution table.  I think this is the intent of the ABI. Agreed: is a , and es are substitution candidates. > The other alternative would be for the demangler to pop off the most > recent substitution when it saw the 'M'.  But we'd have to change [at > least] the libiberty demangler[*] and the clang demangler and the clang > mangler, which seems a bigger challenge. > > I'll commit this next week, unless y'all have comments. > > We have other divergence from clang, with templated lambdas.  Clang > added new manglings [Ty, Tn, Tt] for the lambda's template head (Richard > has a pull request, but it's not merged > https://github.com/itanium-cxx-abi/cxx-abi/issues/31).  Without that, we > consider all the template args to be auto when demangling (which is > going to look odd for non-type template args).  This divergence in > signature also affects the lambda numbering, as gcc & clang differ in > their opinions about 'same lamda signature'.   thoughts on addressing > that to in this cycle? That sounds good: From looking over the issue and pull request, it seems pretty well baked. > I have some demangler fixes coming up. > > nathan > > [*] the demangler already seems to have a bug with 'M' handling. >