diff mbox series

Add missing _Safe_local_iterator_base::_M_attach_symbol export

Message ID bca12122-c0ce-0bec-f8b0-e422e8d7e063@gmail.com
State New
Headers show
Series Add missing _Safe_local_iterator_base::_M_attach_symbol export | expand

Commit Message

François Dumont Oct. 18, 2018, 8:39 p.m. UTC
As reported in another mail a symbol is missing.

This patch update test framework so that the problem is obvious and fix it.

     * testsuite/util/testsuite_containers.h
     (forward_members_unordered<>::forward_members_unordered
     (const value_type&)): Add local_iterator pre and post increment checks.
     * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 new symbol.

Tested under Linux x86_64.

Ok to commit ?

François

Comments

Jonathan Wakely Oct. 18, 2018, 9:40 p.m. UTC | #1
On 18/10/18 22:39 +0200, François Dumont wrote:
>As reported in another mail a symbol is missing.
>
>This patch update test framework so that the problem is obvious and fix it.
>
>    * testsuite/util/testsuite_containers.h
>    (forward_members_unordered<>::forward_members_unordered
>    (const value_type&)): Add local_iterator pre and post increment checks.
>    * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 new symbol.
>
>Tested under Linux x86_64.
>
>Ok to commit ?

OK. Thanks for finding a way to test it too.
diff mbox series

Patch

diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index f90ead30dd1..e8cd286ef0c 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -2054,6 +2054,7 @@  GLIBCXX_3.4.26 {
     # std::basic_filebuf::open(const wchar_t*, openmode)
     _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EE4openEPKwSt13_Ios_Openmode;
 
+    _ZN11__gnu_debug25_Safe_local_iterator_base16_M_attach_singleEPNS_19_Safe_sequence_baseEb;
 } GLIBCXX_3.4.25;
 
 # Symbols in the support library (libsupc++) have their own tag.
diff --git a/libstdc++-v3/testsuite/util/testsuite_containers.h b/libstdc++-v3/testsuite/util/testsuite_containers.h
index eadd43768d2..250dfda668d 100644
--- a/libstdc++-v3/testsuite/util/testsuite_containers.h
+++ b/libstdc++-v3/testsuite/util/testsuite_containers.h
@@ -176,11 +176,12 @@  namespace __gnu_test
 	   typename = typename std::iterator_traits<_Iterator>::iterator_category>
     struct iterator_concept_checks;
 
+#if __cplusplus >= 201103L
   // DR 691.
   template<typename _Tp>
     struct forward_members_unordered
     {
-      forward_members_unordered(typename _Tp::value_type& v)
+      forward_members_unordered(const typename _Tp::value_type& v)
       {
 	// Make sure that even if rel_ops is injected there is no ambiguity
 	// when comparing iterators.
@@ -196,12 +197,20 @@  namespace __gnu_test
 
 	assert( container.cbegin(0) == container.begin(0) );
 	assert( container.cend(0) == container.end(0) );
-	const typename test_type::size_type bn = container.bucket(1);
-	assert( container.cbegin(bn) != container.cend(bn) );
-	assert( container.cbegin(bn) != container.end(bn) );
+	const auto bn = container.bucket(1);
+	auto clit = container.cbegin(bn);
+	assert( clit != container.cend(bn) );
+	assert( clit != container.end(bn) );
+	assert( clit++ == container.cbegin(bn) );
+	assert( clit == container.end(bn) );
+
+	clit = container.cbegin(bn);
+	assert( ++clit == container.cend(bn) );
+
 	assert( container.begin(bn) != container.cend(bn) );
       }
     };
+#endif
 
   template<typename _Iterator>
     struct iterator_concept_checks<_Iterator, false,