From patchwork Mon Jun 27 18:57:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 55454 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4382C383D824 for ; Mon, 27 Jun 2022 18:57:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4382C383D824 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1656356273; bh=EOHfxsXZPeJjEkcDs9HD9tsNsA+2G89qqhmqfYWFvQs=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=H+xJBYSP9guprj6WXUDNWeqcSMXdds06FwLLVL+KMNqYTPUw3Zh0JTb9NoBRUk/9r C/S7SmRXIPSZrG4JTUz69th3GRywwIq4yeMZd5gVq1blIGwIr6vfxFRADNoGY8nw+2 ScPyNWN/Xtecq94LDmr53sQbwcBo6BUnQs2AkCJE= 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 1CE62385E00A for ; Mon, 27 Jun 2022 18:57:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1CE62385E00A 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-466-9RLJRGADMqezynVZF2P7jw-1; Mon, 27 Jun 2022 14:57:11 -0400 X-MC-Unique: 9RLJRGADMqezynVZF2P7jw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 164AD81D9CA for ; Mon, 27 Jun 2022 18:57:11 +0000 (UTC) Received: from pdp-11.redhat.com (unknown [10.22.10.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id F327D2026D64 for ; Mon, 27 Jun 2022 18:57:10 +0000 (UTC) To: GCC Patches Subject: [pushed] c++: Add fixed test [PR89197] Date: Mon, 27 Jun 2022 14:57:04 -0400 Message-Id: <20220627185704.118861-1-polacek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.4 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_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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: Marek Polacek via Gcc-patches From: Marek Polacek Reply-To: Marek Polacek Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Fixed since bug 97899 was fixed. PR c++/89197 gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist130.C: New test. --- gcc/testsuite/g++.dg/cpp0x/initlist130.C | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/initlist130.C base-commit: 5f6b6494035fb984d745efa28d334f7893e7272b diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist130.C b/gcc/testsuite/g++.dg/cpp0x/initlist130.C new file mode 100644 index 00000000000..662a5a3ce3f --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/initlist130.C @@ -0,0 +1,5 @@ +// PR c++/89197 +// { dg-options "-Wno-c++11-extensions" } +// This used to ICE with std=c++03, therefore we run it in C++03 too. + +template void foo(int i) { const int c = int{i}; }