From patchwork Thu Sep 8 14:57:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 1096 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp287362wrt; Thu, 8 Sep 2022 07:58:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR6irrTdu6Udjm8uyCjDMcSTWyh8yKKMQe0oPmBJMKoqOK//4C+rvmV+15pb+CfM4NabzPqI X-Received: by 2002:a05:6402:4305:b0:448:5b80:757a with SMTP id m5-20020a056402430500b004485b80757amr7852453edc.198.1662649090880; Thu, 08 Sep 2022 07:58:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662649090; cv=none; d=google.com; s=arc-20160816; b=C/5sjETFGJnYC/iGrL08wYvXZjGgyPtgjiCaYA1acHox1ClAZwcFGqknNfqc+AgGp4 xJz6i72B+Y6e2t3iy09rLzEM3dsPySVu1MdU9p/7syflOnwqltzm0k5Z5KpaDzC5TZlr tF2aIT77iRAnAbjY/H3U5JfCr1WEvgUstnc5Pt2M5u9uJpGLlMizByMxyWXs/+rcbZid e/G7IsN8qazfjG/6MuXwdp+O/nKlIp31xIf6U267dfFlv3WEoaYaKCfsjodG3ngX7QbH qPMgzY3KSibTiRZbLWlZJJf8sfXQndsrjeANbRDioCnQs1OY3XgYLBhun3uUcQOYUmXA E8+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=+gfRixH1oFJ95DafqyAiJ0uscx3q2i6KGs1gs8DCZUQ=; b=LD29c60r5IthbBcX/UQddLZZNfBDmFPUPLEb4hMqXZCG8GhE2P5URZWRSUz9BBLXS0 nltMwcUB1DawwK9GCPfIUQRWeeyNzlyTizWr5hlmb/drGydWqQVAiBZTPKD3lUvtPXqc YTV1xkimDzYirxIJOOtex2yXBZ0EYI+OEAzGq7Dfl0q/U3c5SVBUNkU15eLhEiJpEuDb /0EW/gEUe7m3OLHFjZMwmmeoReru5pvSgX+SDkWWwqPTR82Qh+eEZA6JP7/mtMEwLH+t +nQzbW+h8D+jlypBCSaAIhmFHn58v+tkAQ9AyYns2UCEgiuPLdmtFX6yoVCPAqtD8nRf 2D7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=WXbkzvSi; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id i15-20020a0564020f0f00b0044f0c273136si4072811eda.466.2022.09.08.07.58.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 07:58:10 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=WXbkzvSi; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8304138582BF for ; Thu, 8 Sep 2022 14:58:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8304138582BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662649089; bh=+gfRixH1oFJ95DafqyAiJ0uscx3q2i6KGs1gs8DCZUQ=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=WXbkzvSigw7gllijpESxtPlB0V63WV6g3CIoOIFnHV5jQ3Lbr2uM4BgMApPtPLIYb 1GUYqpyVCyr/PUe1h+wWMeuXNHfN5EnyZirAtwhK/oY1lFAkqzzobhZ1vwkrW41dsi FZO7wWUyfWNSjIpBZ8PjQI/z4OAgovY3LuZYVDwc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 48ABD3858425 for ; Thu, 8 Sep 2022 14:57:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 48ABD3858425 Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-101-LqGoT8pCO4O_G_pdH5JVSQ-1; Thu, 08 Sep 2022 10:57:23 -0400 X-MC-Unique: LqGoT8pCO4O_G_pdH5JVSQ-1 Received: by mail-qt1-f199.google.com with SMTP id cj19-20020a05622a259300b003446920ea91so14722070qtb.10 for ; Thu, 08 Sep 2022 07:57:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=+gfRixH1oFJ95DafqyAiJ0uscx3q2i6KGs1gs8DCZUQ=; b=ihb2w4rUpq3HU8yGLR01zLxJAxas1eOXlprhdc11LtynTldNqAhgWu9o1xN6Bsi4Zn p0gnz8vnGCAJMHGwx7sF12LhgVg0wqwYotpDOOzekVrnTsK2Oyo7QX7ZfGfiG8Ro7y9f amjBWUjDzVtuZyof9Db2JJfO7A30UTWYGVTC3DeF4pTjTjKL20z5RJM9ESuB0ltYFqmD pz6LU0Lz7hdBAeclaxWn2oomap6bmj7dp8Swm8D8+WhmTKyhcYiEmomtPdaT5Ibst+J0 9iNeKceEekj04DEfTpjTaQlDCwarjmytvA/ZHrS3re7YGgXVC10DtsGyFwNLst5RkV/b sipQ== X-Gm-Message-State: ACgBeo3zTwoIFiQRsHZDwuKE1/3KVeBYHzdiKoknP0zirBqxlbaRFOCg +h0JPP0/5MVxylgW7f7PoBJ8e8NrUGQj3BCg9Jl8EasJprFNNzqmUWV6EuxyK+WrVLsSokcFHvA gGL95PZYhb+LhyoVRWEcCOvKB4rOaTJB/gBBADm1SXZeSxw4w4HhOMQc5XoiUi14G09I= X-Received: by 2002:a05:622a:11d2:b0:343:67a1:85e8 with SMTP id n18-20020a05622a11d200b0034367a185e8mr8041012qtk.11.1662649043182; Thu, 08 Sep 2022 07:57:23 -0700 (PDT) X-Received: by 2002:a05:622a:11d2:b0:343:67a1:85e8 with SMTP id n18-20020a05622a11d200b0034367a185e8mr8040997qtk.11.1662649042925; Thu, 08 Sep 2022 07:57:22 -0700 (PDT) Received: from localhost.localdomain (ool-457670bb.dyn.optonline.net. [69.118.112.187]) by smtp.gmail.com with ESMTPSA id 69-20020a370548000000b006a6ab259261sm16644244qkf.29.2022.09.08.07.57.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 07:57:22 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [committed] c++: Add testcase for already fixed PR [PR99209] Date: Thu, 8 Sep 2022 10:57:16 -0400 Message-Id: <20220908145716.268510-1-ppalka@redhat.com> X-Mailer: git-send-email 2.37.3.518.g79f2338b37 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNWANTED_LANGUAGE_BODY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Patrick Palka via Gcc-patches From: Patrick Palka Reply-To: Patrick Palka Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1743413932889946445?= X-GMAIL-MSGID: =?utf-8?q?1743413932889946445?= This was incidentally fixed by r13-806-g221acd67ca50f8. PR c++/99209 gcc/testsuite/ChangeLog: * g++.dg/cpp2a/lambda-uneval17.C: New test. --- gcc/testsuite/g++.dg/cpp2a/lambda-uneval17.C | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp2a/lambda-uneval17.C diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval17.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval17.C new file mode 100644 index 00000000000..74e0f876371 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval17.C @@ -0,0 +1,17 @@ +// PR c++/99209 +// { dg-do compile { target c++20 } } + +constexpr char f(...) = delete; +constexpr decltype(auto) f_adl(auto a) { return f(a); } + +namespace A { + constexpr char f(auto) { return 'A'; } + template void g(char FunctionParam = f_adl([]{})) { + char Local = f_adl([]{}); + } +} + +namespace B { + constexpr char f(auto) = delete; + void call() { A::g(); } +}