|
|
0fe1ac |
From 992665eab6c48d6a4819f42509346d24b277485d Mon Sep 17 00:00:00 2001
|
|
|
0fe1ac |
From: David Malcolm <dmalcolm@redhat.com>
|
|
|
0fe1ac |
Date: Thu, 2 Sep 2021 16:17:29 -0400
|
|
|
0fe1ac |
Subject: [PATCH 15/17] Conditionalize test for PR libstdc++/87135 on
|
|
|
0fe1ac |
__LIBSTDCXX_SO_VERSION >= 9
|
|
|
0fe1ac |
|
|
|
0fe1ac |
This VERIFY was added upstream 2018-09-18 as part of:
|
|
|
0fe1ac |
re PR libstdc++/87135 ([C++17] unordered containers violate iterator validity requirements)
|
|
|
0fe1ac |
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=a521e62615e439aea7502a52fd0f8a21eaa6304f
|
|
|
0fe1ac |
|
|
|
0fe1ac |
but fails when run in DTS against a system libstdc++.so from an older GCC.
|
|
|
0fe1ac |
|
|
|
0fe1ac |
In particular, rehash from the header is using
|
|
|
0fe1ac |
std::__detail::_Prime_rehash_policy::_M_next_bkt
|
|
|
0fe1ac |
from the system .so:
|
|
|
0fe1ac |
|
|
|
0fe1ac |
12: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF std::__detail::_Prime_rehash_policy::_M_next_bkt(unsigned long) const@GLIBCXX_3.4.18 (5)
|
|
|
0fe1ac |
225: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF std::__detail::_Prime_rehash_policy::_M_next_bkt(unsigned long) const@@GLIBCXX_3.4.18
|
|
|
0fe1ac |
---
|
|
|
0fe1ac |
.../23_containers/unordered_map/modifiers/reserve.cc | 4 ++++
|
|
|
0fe1ac |
1 file changed, 4 insertions(+)
|
|
|
0fe1ac |
|
|
|
0fe1ac |
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/reserve.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/reserve.cc
|
|
|
0fe1ac |
index 58c8924b9..4c79ec2e6 100644
|
|
|
0fe1ac |
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/reserve.cc
|
|
|
0fe1ac |
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/reserve.cc
|
|
|
0fe1ac |
@@ -46,7 +46,11 @@ void test01()
|
|
|
0fe1ac |
|
|
|
0fe1ac |
// As long as we insert less than the reserved number of elements we
|
|
|
0fe1ac |
// shouldn't experiment any rehash.
|
|
|
0fe1ac |
+
|
|
|
0fe1ac |
+ // Fixed upstream in GCC 9
|
|
|
0fe1ac |
+#if __LIBSTDCXX_SO_VERSION >= 9
|
|
|
0fe1ac |
VERIFY( m.bucket_count() == bkts );
|
|
|
0fe1ac |
+#endif
|
|
|
0fe1ac |
|
|
|
0fe1ac |
VERIFY( m.load_factor() <= m.max_load_factor() );
|
|
|
0fe1ac |
}
|
|
|
0fe1ac |
--
|
|
|
0fe1ac |
2.31.1
|
|
|
0fe1ac |
|