From patchwork Thu Jan 20 20:04:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 1582316 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=LwRaFCtd; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4Jftlp3P7Dz9sCD for ; Fri, 21 Jan 2022 07:05:08 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A5993857824 for ; Thu, 20 Jan 2022 20:05:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A5993857824 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1642709106; bh=ybNGzZ1f4nViT6ho1znjLdXUtADVbL2flMCrj3vQ5qg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=LwRaFCtduZjg5Ch+Isj/DFi67OCF21VqsSbKF62rquESiwl0Mzyl8Azeud31U+s5/ KTsKvycTPqpdgPepc9ezU5zlQPWWJr3Xy75o7uoN7/6JoBts6oD8M2MAwSny8nbptL UzTZsXoGQNYJfmD9+hj+eZmsp6C4uVbW1i3tJc5A= 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 52925385840D for ; Thu, 20 Jan 2022 20:04:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 52925385840D Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-592-0a2sdkS2NFCskXAz8rb-Ug-1; Thu, 20 Jan 2022 15:04:16 -0500 X-MC-Unique: 0a2sdkS2NFCskXAz8rb-Ug-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E571C814246 for ; Thu, 20 Jan 2022 20:04:15 +0000 (UTC) Received: from pdp-11.hsd1.ma.comcast.net (unknown [10.22.17.253]) by smtp.corp.redhat.com (Postfix) with ESMTP id AAE5010016FE for ; Thu, 20 Jan 2022 20:04:15 +0000 (UTC) To: GCC Patches Subject: [pushed] c++: Add test for fixed PR [PR102338] Date: Thu, 20 Jan 2022 15:04:07 -0500 Message-Id: <20220120200407.59538-1-polacek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-14.0 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, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP 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: Marek Polacek via Gcc-patches From: Marek Polacek Reply-To: Marek Polacek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" This was fixed by r12-6025 and is sufficiently different from noexcept71.C that I think we should add it. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/102338 gcc/testsuite/ChangeLog: * g++.dg/cpp1y/noexcept2.C: New test. --- gcc/testsuite/g++.dg/cpp1y/noexcept2.C | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1y/noexcept2.C base-commit: 2f34d7ef3d026cf7109b6e6bb2eca14c840e7c71 diff --git a/gcc/testsuite/g++.dg/cpp1y/noexcept2.C b/gcc/testsuite/g++.dg/cpp1y/noexcept2.C new file mode 100644 index 00000000000..38dd05cd066 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/noexcept2.C @@ -0,0 +1,20 @@ +// PR c++/102338 +// { dg-do compile { target c++14 } } + +struct S { + template + static auto f(T&& t) noexcept { + return true; + } + + template + static auto f(T&& t, Ts&& ... ts) noexcept(noexcept(f(ts...))) { + return f(ts...); + } + +}; + +int main() { + S::f(true, 0, 5u); + return 0; +}