|
|
f49307 |
From fa770c25013df537c41d0929c4202b0a774a6a75 Mon Sep 17 00:00:00 2001
|
|
|
f49307 |
From: David Malcolm <dmalcolm@redhat.com>
|
|
|
f49307 |
Date: Thu, 2 Sep 2021 15:27:59 -0400
|
|
|
f49307 |
Subject: [PATCH 14/17] Conditionalize tests for PR libstdc++/98466 on
|
|
|
f49307 |
__LIBSTDCXX_SO_VERSION >= 11
|
|
|
f49307 |
|
|
|
f49307 |
The tests:
|
|
|
f49307 |
23_containers/deque/debug/98466.cc
|
|
|
f49307 |
23_containers/unordered_map/debug/98466.cc
|
|
|
f49307 |
were added upstream 2021-01-01 as part of:
|
|
|
f49307 |
libstdc++: Implement N3644 for _GLIBCXX_DEBUG iterators
|
|
|
f49307 |
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=05a30af3f237984b4dcf1dbbc17fdac583c46506
|
|
|
f49307 |
but fail when run in DTS against a system libstdc++.so
|
|
|
f49307 |
from an older GCC.
|
|
|
f49307 |
|
|
|
f49307 |
In particular, they use the older implementation of _M_can_compare from
|
|
|
f49307 |
the dynamic library:
|
|
|
f49307 |
|
|
|
f49307 |
$ eu-readelf -s 98466.exe | grep can_compare | c++filt
|
|
|
f49307 |
11: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF __gnu_debug::_Safe_iterator_base::_M_can_compare(__gnu_debug::_Safe_iterator_base const&) const@GLIBCXX_3.4 (4)
|
|
|
f49307 |
157: 0000000000000000 0 FUNC GLOBAL DEFAULT UNDEF __gnu_debug::_Safe_iterator_base::_M_can_compare(__gnu_debug::_Safe_iterator_base const&) const@@GLIBCXX_3.4
|
|
|
f49307 |
---
|
|
|
f49307 |
.../testsuite/23_containers/deque/debug/98466.cc | 6 ++++++
|
|
|
f49307 |
.../23_containers/unordered_map/debug/98466.cc | 12 ++++++++++++
|
|
|
f49307 |
2 files changed, 18 insertions(+)
|
|
|
f49307 |
|
|
|
f49307 |
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/98466.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/98466.cc
|
|
|
f49307 |
index c2d793374..e92d719bf 100644
|
|
|
f49307 |
--- a/libstdc++-v3/testsuite/23_containers/deque/debug/98466.cc
|
|
|
f49307 |
+++ b/libstdc++-v3/testsuite/23_containers/deque/debug/98466.cc
|
|
|
f49307 |
@@ -26,11 +26,17 @@ void test01()
|
|
|
f49307 |
{
|
|
|
f49307 |
typedef typename __gnu_debug::deque<int>::iterator It;
|
|
|
f49307 |
It it = It();
|
|
|
f49307 |
+ // Fixed upstream in GCC 11
|
|
|
f49307 |
+#if __LIBSTDCXX_SO_VERSION >= 11
|
|
|
f49307 |
VERIFY( it == it );
|
|
|
f49307 |
+#endif
|
|
|
f49307 |
|
|
|
f49307 |
typedef typename __gnu_debug::deque<int>::const_iterator Cit;
|
|
|
f49307 |
Cit cit = Cit();
|
|
|
f49307 |
+ // Fixed upstream in GCC 11
|
|
|
f49307 |
+#if __LIBSTDCXX_SO_VERSION >= 11
|
|
|
f49307 |
VERIFY( cit == cit );
|
|
|
f49307 |
+#endif
|
|
|
f49307 |
}
|
|
|
f49307 |
|
|
|
f49307 |
int main()
|
|
|
f49307 |
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/98466.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/98466.cc
|
|
|
f49307 |
index cc22b9ff8..3a1b6cd32 100644
|
|
|
f49307 |
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/98466.cc
|
|
|
f49307 |
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/98466.cc
|
|
|
f49307 |
@@ -25,16 +25,28 @@
|
|
|
f49307 |
void test01()
|
|
|
f49307 |
{
|
|
|
f49307 |
__gnu_debug::unordered_map<int, int>::iterator it{};
|
|
|
f49307 |
+ // Fixed upstream in GCC 11
|
|
|
f49307 |
+#if __LIBSTDCXX_SO_VERSION >= 11
|
|
|
f49307 |
VERIFY( it == it );
|
|
|
f49307 |
+#endif
|
|
|
f49307 |
|
|
|
f49307 |
__gnu_debug::unordered_map<int, int>::const_iterator cit{};
|
|
|
f49307 |
+ // Fixed upstream in GCC 11
|
|
|
f49307 |
+#if __LIBSTDCXX_SO_VERSION >= 11
|
|
|
f49307 |
VERIFY( cit == cit );
|
|
|
f49307 |
+#endif
|
|
|
f49307 |
|
|
|
f49307 |
__gnu_debug::unordered_map<int, int>::local_iterator lit{};
|
|
|
f49307 |
+ // Fixed upstream in GCC 11
|
|
|
f49307 |
+#if __LIBSTDCXX_SO_VERSION >= 11
|
|
|
f49307 |
VERIFY( lit == lit );
|
|
|
f49307 |
+#endif
|
|
|
f49307 |
|
|
|
f49307 |
__gnu_debug::unordered_map<int, int>::const_local_iterator clit{};
|
|
|
f49307 |
+ // Fixed upstream in GCC 11
|
|
|
f49307 |
+#if __LIBSTDCXX_SO_VERSION >= 11
|
|
|
f49307 |
VERIFY( clit == clit );
|
|
|
f49307 |
+#endif
|
|
|
f49307 |
}
|
|
|
f49307 |
|
|
|
f49307 |
int main()
|
|
|
f49307 |
--
|
|
|
f49307 |
2.31.1
|
|
|
f49307 |
|