[gcc r14-11587] libstdc++: Fix test broken when using COW std::string
Jonathan Wakely
redi@gcc.gnu.org
Thu Apr 10 11:49:12 GMT 2025
https://gcc.gnu.org/g:9119752d3782a50effbfc1ebaed3902bae75c419
commit r14-11587-g9119752d3782a50effbfc1ebaed3902bae75c419
Author: François Dumont <frs.dumont@gmail.com>
Date: Thu Oct 24 20:30:16 2024 +0200
libstdc++: Fix test broken when using COW std::string
libstdc++-v3/ChangeLog:
* testsuite/23_containers/unordered_map/96088.cc (test03): Fix increments
value when _GLIBCXX_USE_CXX11_ABI is equal to 0.
(cherry picked from commit d01dc97a26d2f5034ca135f46094aa52c44cc90a)
Diff:
---
libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc
index b5be7d06aa03..ee41675a16ba 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc
@@ -233,9 +233,8 @@ test03()
um.insert(v.begin(), v.end());
VERIFY( um.size() == 1 );
- // Allocate array of buckets, a node, the std::string value and the
- // std::string key (unless COW).
- constexpr std::size_t increments = _GLIBCXX_USE_CXX11_ABI ? 4 : 3;
+ // Allocate array of buckets, a node, and the 2 std::string (unless COW).
+ constexpr std::size_t increments = _GLIBCXX_USE_CXX11_ABI ? 4 : 2;
VERIFY( __gnu_test::counter::count() == origin + increments );
VERIFY( __gnu_test::counter::get()._M_increments == increments );
More information about the Libstdc++-cvs
mailing list