diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-09-01 17:06:51 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-09-01 17:52:41 +0100 |
commit | b0d75f7d3bb24e94c5a3d764c95d598ad6b6ca48 (patch) | |
tree | 29d0410a68bb268de2128368e10fda2a5e7c10de | |
parent | e3d25188b093c3b8552f2b3e3a33c2a6059e3ad6 (diff) | |
download | gcc-b0d75f7d3bb24e94c5a3d764c95d598ad6b6ca48.zip gcc-b0d75f7d3bb24e94c5a3d764c95d598ad6b6ca48.tar.gz gcc-b0d75f7d3bb24e94c5a3d764c95d598ad6b6ca48.tar.bz2 |
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.
-rw-r--r-- | libstdc++-v3/testsuite/25_algorithms/copy/debug/constexpr_neg.cc | 8 | ||||
-rw-r--r-- | libstdc++-v3/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 6981c47..bf3c493 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 bb613be..f5e46e5 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 } |