From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 7AED43858417; Mon, 18 Mar 2024 14:03:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7AED43858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710770632; bh=c7ZUE4Fn3AyuMG80xVYUgMQcI7PclNqeip2qQKzQAqg=; h=From:To:Subject:Date:From; b=vvWuFZY3A1CO2K1iAKISV9SWJu2EvTFKEYiwNgGKqyeXuJU0qWFBXKRyBHybyZ/r3 EKKNfoAC9kgbITjrWNi8rBFcuibU4lWBjrzqeakLeQHf1+rd4qVJAnXpcq3aX99tR5 ECHdSeXlQhseQzQNAvTox+P8VdNuqKD1K0S3eOlQ= 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 r12-10227] libstdc++: Fix access error in __gnu_test::uneq_allocator X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: 415457babf04d077929956ea97132448b0dc4b2c X-Git-Newrev: 80e88183d47ca4d7c8441355f736fc918d7d05dc Message-Id: <20240318140352.7AED43858417@sourceware.org> Date: Mon, 18 Mar 2024 14:03:52 +0000 (GMT) List-Id: https://gcc.gnu.org/g:80e88183d47ca4d7c8441355f736fc918d7d05dc commit r12-10227-g80e88183d47ca4d7c8441355f736fc918d7d05dc Author: Jonathan Wakely Date: Thu Nov 23 14:34:59 2023 +0000 libstdc++: Fix access error in __gnu_test::uneq_allocator The operator== function is only a friend of the LHS argument, so cannot access the private member of the RHS argument. Use the public accessor instead. libstdc++-v3/ChangeLog: * testsuite/util/testsuite_allocator.h (uneq_allocator): Fix equality operator for heterogeneous comparisons. (cherry picked from commit 0585daf7de0673ade9feca1be66a68178786b48d) Diff: --- libstdc++-v3/testsuite/util/testsuite_allocator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h index f33f602d2af..0c41181b4a5 100644 --- a/libstdc++-v3/testsuite/util/testsuite_allocator.h +++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h @@ -418,7 +418,7 @@ namespace __gnu_test operator==(const uneq_allocator& a, const uneq_allocator::other>& b) - { return a.personality == b.personality; } + { return a.personality == b.get_personality(); } template friend inline bool