public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-8744] libstdc++: Fix invalid order in PSTL inplace_merge test [PR90276] Date: Fri, 2 Feb 2024 10:27:39 +0000 (GMT) [thread overview] Message-ID: <20240202102739.3AAFD3857C51@sourceware.org> (raw) 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");
reply other threads:[~2024-02-02 10:27 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240202102739.3AAFD3857C51@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).