From patchwork Tue Mar 14 07:54:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 69347 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1620655wrd; Tue, 14 Mar 2023 00:55:18 -0700 (PDT) X-Google-Smtp-Source: AK7set9TbJQJqUPb8vW7XNIy0/LeFd/kSIeHvgUPnTaqRHb7glNr+e/X1cK666kRfoRCo8kAYLMN X-Received: by 2002:a05:6402:401:b0:4fd:f0a7:e0a1 with SMTP id q1-20020a056402040100b004fdf0a7e0a1mr848320edv.24.1678780518292; Tue, 14 Mar 2023 00:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678780518; cv=none; d=google.com; s=arc-20160816; b=ZDg384015UUK8qQ6skZUL8T4FDJaJ63rq8KQ7Gce8mvQ0HNtJ3qc9dw3yn1570QAJE CMr2AJEKXEfBwqhwmV1gELrQY3cabZ9Z23QNBcrVOgthfcDo4Tq+RlntyRaKh0YHXLmm zDHRAqtD/mTuUdMPWnWyc6scwk2mHTHMj45+i3sL7Dd3XYWykcGvG28gBmcx7tR8GN05 8uCAJHP+UVhyiscpuTh2ve+I+8yNjFFLh8h0dtfgVnftWZl8yB5xMkNxSmW2dEzBrYwI fYJnPQhiBrVXjFA9h05CNNP3QC3uMNAYfDSJoSvo2ybgrjytaUnt41FSH199RkQRMX3y nM8Q== 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-disposition:in-reply-to:mime-version:references:message-id :subject:cc:to:date:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=TaIWIqoyyAedghmUzAoQHyMgu00U7iuSl7Dz+mnguVA=; b=wvHlPSG1zO1w19jFDM/+oEzkIMzuDEGS1GBrf5eRafIM1nF1z/iVn/Ai4AELOvEITp vhLUZCmtpKdQXyLy6djEWp4A4tN1Riy6jwg2PdtOFBkHhnmjAXUaQt07Dgt0vKD07MC4 t84kIlbw1/u7DC2GBN6hqOfrc7P3Dstj0Ca0GNPtBiCk7vqzeoeeECf7OhRwbU1h50zF USohK+++t0xe+yHMYhkA+wCXQVTAmZWpbEshKZH16RT7BsCoe++BsmmO4pt1/h4xbHvx 0wIjx34pART36Jy+0LNcHocQemq2cGkcxR2LsqyIYjeMAFo+/OS87ipmFwI4zq0hYVqi Xxuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=eUKfyyVX; 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 v9-20020aa7d9c9000000b004fd9cad9928si1397559eds.40.2023.03.14.00.55.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 00:55:18 -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=eUKfyyVX; 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 1A65D3858C27 for ; Tue, 14 Mar 2023 07:55:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A65D3858C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678780517; bh=TaIWIqoyyAedghmUzAoQHyMgu00U7iuSl7Dz+mnguVA=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=eUKfyyVXjHeuhKi5AkawZovV4P0SFjvvy3yr97apipLwOTn2pmzsf2R6WdDJLskiP eaQP25FntT4nBGRVzy+W1As3tcq3e7IAPhqnTqx8uTlDoQ9ujG5IetpHSyXIb6GxXW odJQlEq4nxjzKd2NkQYFGq4ucomVRWOPtJaDjqNw= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 231313858D32 for ; Tue, 14 Mar 2023 07:54:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 231313858D32 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-450-akE2SVNfNO-fjJLs2L19bw-1; Tue, 14 Mar 2023 03:54:32 -0400 X-MC-Unique: akE2SVNfNO-fjJLs2L19bw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 27D1E101A521 for ; Tue, 14 Mar 2023 07:54:32 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DAFD5140EBF4; Tue, 14 Mar 2023 07:54:31 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 32E7sTOT606962 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 08:54:30 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 32E7sTnV606961; Tue, 14 Mar 2023 08:54:29 +0100 Date: Tue, 14 Mar 2023 08:54:28 +0100 To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix up g++.dg/cpp2a/concepts-lambda3.C [PR108972] Message-ID: References: <20230310184938.2531120-1-jason@redhat.com> MIME-Version: 1.0 In-Reply-To: <20230310184938.2531120-1-jason@redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 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_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 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek 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?1760328960535122291?= X-GMAIL-MSGID: =?utf-8?q?1760328960535122291?= Hi! On Fri, Mar 10, 2023 at 01:49:38PM -0500, Jason Merrill via Gcc-patches wrote: > gcc/testsuite/ChangeLog: > > * g++.dg/cpp2a/concepts-lambda3.C: Run at lower std levels, > but expect errors. I'm seeing +UNRESOLVED: g++.dg/cpp2a/concepts-lambda3.C -std=c++11 compilation failed to produce executable +UNRESOLVED: g++.dg/cpp2a/concepts-lambda3.C -std=c++14 compilation failed to produce executable +UNRESOLVED: g++.dg/cpp2a/concepts-lambda3.C -std=c++17 compilation failed to produce executable +UNRESOLVED: g++.dg/cpp2a/concepts-lambda3.C -std=c++98 compilation failed to produce executable with this change, and if I test with GXX_TESTSUITE_STDS=98,11,14,17,20,2b make check-g++ -k RUNTESTFLAGS="--target_board=unix\{-m32,-m64,-m64/-fconcepts\} dg.exp=concepts-lambda3.C" I see even FAILs for the -fconcepts case, so apparently even -std=c++17 -fconcepts isn't enough to make it compile without errors. The following patch will expect errors for all of c++17_down and will make the test dg-do compile for that case too, such that the UNRESOLVED stuff is gone. Ok for trunk? 2023-03-14 Jakub Jelinek PR c++/108972 * g++.dg/cpp2a/concepts-lambda3.C: Use dg-do run only for c++20, for c++17_down dg-do compile. Expect dg-excess-errors for c++17_down rather than ! concepts. Jakub --- gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C.jj 2023-03-13 23:01:42.082959131 +0100 +++ gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C 2023-03-14 08:48:12.834128044 +0100 @@ -1,5 +1,6 @@ -// { dg-do run } -// { dg-excess-errors "" { target { ! concepts } } } (PR108972) +// { dg-do run { target c++20 } } +// { dg-do compile { target c++17_down } } +// { dg-excess-errors "" { target { c++17_down } } } (PR108972) template concept C1 = __is_same_as(T, int)