public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-3630] libstdc++: Fix debug-mode tests for constexpr algorithms
@ 2023-09-01 16:55 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-09-01 16:55 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:b0d75f7d3bb24e94c5a3d764c95d598ad6b6ca48

commit r14-3630-gb0d75f7d3bb24e94c5a3d764c95d598ad6b6ca48
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Sep 1 17:06:51 2023 +0100

    libstdc++: Fix debug-mode tests for constexpr algorithms
    
    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.

Diff:
---
 .../testsuite/25_algorithms/copy/debug/constexpr_neg.cc        |  8 +++-----
 .../testsuite/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 6981c4706661..bf3c4939bfb7 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 bb613bef03b4..f5e46e58e496 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 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-01 16:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-01 16:55 [gcc r14-3630] libstdc++: Fix debug-mode tests for constexpr algorithms Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).