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