From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id B97B03858C50; Sat, 18 Mar 2023 09:54:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B97B03858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679133259; bh=Qbka4fGRGs8yxTLnK7TJlV1HY6iniAu6YuZ+uCS5K2k=; h=From:To:Subject:Date:From; b=aC72z8Y2pBpkIRlcBHy7zgM9+jmzCjpiS9UwdIUIBCltVPjmC4ZzP0MEZKGYXvLx3 igAPSsgAz78uGSLMXFOVRXB90KPvED8FhXgIcnESnDSfe+e7hH+z0CZfByHvdaowmy InIq94Twjh8Ke9Cked0441nnhtcmWkl939F6N5c4= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-6748] libstdc++: Fix test for hash>::operator() [PR109165] X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: d7caf313525a46f200d7f5db1ba893f853774aee X-Git-Newrev: 9b83d4755a7da02f25788fce14bec949e7045f8f Message-Id: <20230318095419.B97B03858C50@sourceware.org> Date: Sat, 18 Mar 2023 09:54:19 +0000 (GMT) List-Id: https://gcc.gnu.org/g:9b83d4755a7da02f25788fce14bec949e7045f8f commit r13-6748-g9b83d4755a7da02f25788fce14bec949e7045f8f Author: Jonathan Wakely Date: Fri Mar 17 11:39:55 2023 +0000 libstdc++: Fix test for hash>::operator() [PR109165] libstdc++-v3/ChangeLog: PR libstdc++/109165 * testsuite/18_support/coroutines/hash.cc: Use const object in second call. Diff: --- libstdc++-v3/testsuite/18_support/coroutines/hash.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/testsuite/18_support/coroutines/hash.cc b/libstdc++-v3/testsuite/18_support/coroutines/hash.cc index 68e5e640477..81b68f8246a 100644 --- a/libstdc++-v3/testsuite/18_support/coroutines/hash.cc +++ b/libstdc++-v3/testsuite/18_support/coroutines/hash.cc @@ -7,11 +7,12 @@ void test01() { + auto coro = std::noop_coroutine(); std::hash h; - std::size_t v = h(std::noop_coroutine()); + std::size_t v = h(coro); const auto& ch = h; - std::size_t v2 = h(std::noop_coroutine()); // PR libstdc++/109165 + std::size_t v2 = ch(coro); // PR libstdc++/109165 VERIFY( v2 == v ); }