From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 87285385C6F2 for ; Fri, 1 Sep 2023 16:56:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87285385C6F2 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693587377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xMNhc5gmxNT8aW59hhAh9WKrvixDyAz2cGVT9ge/sNs=; b=WAjM5w0G4SsXpOG5hvYffCNITDotfXbyqOn2ur9Itt/ylYxxiDnKlOnhlm1jqsUo2/0Jo5 IabHw3XIXBWGQFFQjBX5kBKSBaUbd724HsA0XjlNyV/sn/iSy8Sf3Bg8iPs2TB1DEVeycO RumS8PtrLzQ0JH5aR9QmaU9XYMO34WE= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-648-1SyMBSOOP9i9nikqRXOiFw-1; Fri, 01 Sep 2023 12:56:14 -0400 X-MC-Unique: 1SyMBSOOP9i9nikqRXOiFw-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 E011B381DC9E; Fri, 1 Sep 2023 16:56:13 +0000 (UTC) Received: from localhost (unknown [10.42.28.181]) by smtp.corp.redhat.com (Postfix) with ESMTP id A86E92017E87; Fri, 1 Sep 2023 16:56:13 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix debug-mode tests for constexpr algorithms Date: Fri, 1 Sep 2023 17:56:09 +0100 Message-ID: <20230901165613.283062-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 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,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tested x86_64-linux. Pushed to trunk. -- >8 -- These tests started failing at some point: FAIL: 25_algorithms/copy/debug/constexpr_neg.cc (test for errors, line 49) FAIL: 25_algorithms/copy/debug/constexpr_neg.cc (test for excess errors) FAIL: 25_algorithms/equal/debug/constexpr_neg.cc (test for errors, line 47) FAIL: 25_algorithms/equal/debug/constexpr_neg.cc (test for excess errors) They only run with -D_GLIBCXX_DEBUG or make check-debug so seem to have gone unnoticed until now. libstdc++-v3/ChangeLog: * testsuite/25_algorithms/copy/debug/constexpr_neg.cc: Adjust expected errors. * testsuite/25_algorithms/equal/debug/constexpr_neg.cc: Likewise. --- .../25_algorithms/copy/debug/constexpr_neg.cc | 8 +++----- .../25_algorithms/equal/debug/constexpr_neg.cc | 10 ++++------ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/debug/constexpr_neg.cc b/libstdc++-v3/testsuite/25_algorithms/copy/debug/constexpr_neg.cc index 6981c470666..bf3c4939bfb 100644 --- a/libstdc++-v3/testsuite/25_algorithms/copy/debug/constexpr_neg.cc +++ b/libstdc++-v3/testsuite/25_algorithms/copy/debug/constexpr_neg.cc @@ -34,6 +34,7 @@ test1() } static_assert(test1()); // { dg-error "non-constant condition" } +// { dg-error "builtin_unreachable" "" { target *-*-* } 0 } constexpr bool test2() @@ -46,8 +47,5 @@ test2() return out6 == ma0.begin() + 18; } -static_assert(test2()); // { dg-error "is outside the bounds" } - -// { dg-prune-output "in 'constexpr' expansion" } -// { dg-prune-output "builtin_unreachable" } -// { dg-prune-output "non-constant condition" } +static_assert(test2()); // { dg-error "non-constant condition" } +// { dg-error "is outside the bounds" "" { target *-*-* } 0 } diff --git a/libstdc++-v3/testsuite/25_algorithms/equal/debug/constexpr_neg.cc b/libstdc++-v3/testsuite/25_algorithms/equal/debug/constexpr_neg.cc index bb613bef03b..f5e46e58e49 100644 --- a/libstdc++-v3/testsuite/25_algorithms/equal/debug/constexpr_neg.cc +++ b/libstdc++-v3/testsuite/25_algorithms/equal/debug/constexpr_neg.cc @@ -32,7 +32,8 @@ test01() return outa; } -static_assert(test01()); // { dg-error } +static_assert(test01()); // { dg-error "non-constant condition" } +// { dg-error "builtin_unreachable" "" { target *-*-* } 0 } constexpr bool test02() @@ -44,8 +45,5 @@ test02() return outa; } -static_assert(test02()); // { dg-error "outside the bounds" } - -// { dg-prune-output "non-constant condition" } -// { dg-prune-output "in 'constexpr'" } -// { dg-prune-output "builtin_unreachable" } +static_assert(test02()); // { dg-error "non-constant condition" } +// { dg-error "is outside the bounds" "" { target *-*-* } 0 } -- 2.41.0