public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8744] libstdc++: Fix invalid order in PSTL inplace_merge test [PR90276]
@ 2024-02-02 10:27 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2024-02-02 10:27 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:a6286584e5536d1853a851b8c2ac3196956e3068
commit r14-8744-ga6286584e5536d1853a851b8c2ac3196956e3068
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Feb 1 10:06:15 2024 +0000
libstdc++: Fix invalid order in PSTL inplace_merge test [PR90276]
This looks like a typo in the upstream test that causes a failure in
debug mode. It has been reported upstream.
libstdc++-v3/ChangeLog:
PR libstdc++/90276
* testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Fix
comparison function to use less-than instead of equality.
Diff:
---
libstdc++-v3/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc b/libstdc++-v3/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc
index 576f22423b88..a9205553574a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc
@@ -160,7 +160,7 @@ main()
test_by_type<MemoryChecker>(
[](std::size_t idx){ return MemoryChecker{std::int32_t(idx * 2)}; },
[](std::size_t idx){ return MemoryChecker{std::int32_t(idx * 2 + 1)}; },
- [](const MemoryChecker& val1, const MemoryChecker& val2){ return val1.value() == val2.value(); });
+ [](const MemoryChecker& val1, const MemoryChecker& val2){ return val1.value() < val2.value(); });
EXPECT_FALSE(MemoryChecker::alive_objects() < 0, "wrong effect from inplace_merge: number of ctors calls < num of dtors calls");
EXPECT_FALSE(MemoryChecker::alive_objects() > 0, "wrong effect from inplace_merge: number of ctors calls > num of dtors calls");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-02 10:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-02 10:27 [gcc r14-8744] libstdc++: Fix invalid order in PSTL inplace_merge test [PR90276] 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).