From patchwork Mon Feb 21 14:31:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 1595588 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=A4HRbDgl; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K2Prk6L5sz9sGY for ; Tue, 22 Feb 2022 01:32:05 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 44532385C40B for ; Mon, 21 Feb 2022 14:32:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44532385C40B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1645453922; bh=Hdou0saHXPjNDi94cEiCcwTzeGK34C9BkWY1FEgJmEs=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=A4HRbDgldiWWDTaQSDxto4ZN6QgPLMJEM1+KUaIq+qkYVZCz9baHXn67CNR3tnhU0 leEw4rDQsNfUQTHMw8hyesjqFGTFCBIGLkQUOZku9juFn2IKwkMMniCmmrP/eDzPei NQtAeHtCxxe8jsCj3sX9mWPJyzIDnhQ3hXNo452E= 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 14CD53858410 for ; Mon, 21 Feb 2022 14:31:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 14CD53858410 Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-503-Y5MEVuF9N9Kufq3tlAr1FA-1; Mon, 21 Feb 2022 09:31:20 -0500 X-MC-Unique: Y5MEVuF9N9Kufq3tlAr1FA-1 Received: by mail-qv1-f72.google.com with SMTP id e9-20020a0cf749000000b0042bf697ff6bso17332737qvo.5 for ; Mon, 21 Feb 2022 06:31:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Hdou0saHXPjNDi94cEiCcwTzeGK34C9BkWY1FEgJmEs=; b=Ng+zAitocSGIlMLQsxGibM12uVE9gfQdkI0OWmcSvq5ZVRoFHEk1AVA6iM+EkJ6BTg zGqwIgt3GvaccE2+O/YUvu6JIcyD257TP8LNLc4sQ4mS7OjsQsbkfJUuKOIrT+ORV4io Te1w9VEROvguPgUPWtITEL739aughLYTq2QixswUAnGrlL7ssKeICyIHGjA5U107wZsl dNweRfx28wXCb2bB6ClWueScmm57g4Gmw1BbWdqGBr5FTWQBfRxTc/PC8xK6Q2aEt7X8 CPyMhgTOmxFOsM1JEzYW8GxULGKjESCQj6YQX+E1+tAwnswKnPEXXwFqn/+95Am8jXFo oK5w== X-Gm-Message-State: AOAM533xCC2JpzSpikBOM5mRTobPBMCstCCnW9kUCtHc0gLdUbHs2Sdz pUtdM4/v7ayHXs/dyq4XCVOqeZs3u+uL/dlTKj8Sp/KT0bjRSKhY3tp5fmbeB8nEHmRTejBAjhi BG4WBO69+UXkIth94FW8ai8SDlBiiT2S6ASf4z5Tau4yBbfrZhnjMqNsTFJboGt4U/Ww= X-Received: by 2002:a05:6214:13e7:b0:42d:1a0d:a437 with SMTP id ch7-20020a05621413e700b0042d1a0da437mr15638704qvb.46.1645453879785; Mon, 21 Feb 2022 06:31:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyd7KYlLJqGnhH0OqHUksLuZwrpDB2+6BpyCCKTlgxjB88h3sPsQPS9tVyqFI02fn2yb6J7fQ== X-Received: by 2002:a05:6214:13e7:b0:42d:1a0d:a437 with SMTP id ch7-20020a05621413e700b0042d1a0da437mr15638669qvb.46.1645453879480; Mon, 21 Feb 2022 06:31:19 -0800 (PST) Received: from localhost.localdomain (ool-18e40894.dyn.optonline.net. [24.228.8.148]) by smtp.gmail.com with ESMTPSA id d15sm23758856qtx.30.2022.02.21.06.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 06:31:18 -0800 (PST) To: gcc-patches@gcc.gnu.org Subject: [committed] c++: Add testcase for already fixed PR [PR85493] Date: Mon, 21 Feb 2022 09:31:17 -0500 Message-Id: <20220221143117.313118-1-ppalka@redhat.com> X-Mailer: git-send-email 2.35.1.225.ge2ac9141e6 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-14.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 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" The a1 and a2 case were fixed (by diagnosing the invalid expression) with r11-434, and the a3 case with r8-7625. PR c++/85493 gcc/testsuite/ChangeLog: * g++.dg/cpp0x/decltype80.C: New test. --- gcc/testsuite/g++.dg/cpp0x/decltype80.C | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/decltype80.C diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype80.C b/gcc/testsuite/g++.dg/cpp0x/decltype80.C new file mode 100644 index 00000000000..6ad140fe548 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/decltype80.C @@ -0,0 +1,16 @@ +// PR c++/85493 +// { dg-do compile { target c++11 } } + +struct no_def { + no_def() = delete; +}; + +template +int foo() = delete; + +template +void test() { + decltype(no_def()) a1; // { dg-error "deleted" } + decltype(no_def(1,2,3)) a2; // { dg-error "no match" } + decltype(foo<>()) a3; // { dg-error "deleted" } +}