Fix testsuite failures in Debug Mode
authorJonathan Wakely <jwakely@redhat.com>
Fri, 19 Oct 2018 13:37:05 +0000 (14:37 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 19 Oct 2018 13:37:05 +0000 (14:37 +0100)
This fixes the following testsuite failures on ia32 when compiled with
-D_GLIBCXX_DEBUG:

FAIL: 23_containers/map/modifiers/erase/dr130-linkage-check.cc
FAIL: 23_containers/multimap/modifiers/erase/dr130-linkage-check.cc
FAIL: 23_containers/multiset/modifiers/erase/dr130-linkage-check.cc
FAIL: 23_containers/set/modifiers/erase/dr130-linkage-check.cc

The normal mode containers already use the abi-tag to mangle these
overloads differently, but the debug mode versions weren't fixed.

* include/debug/map.h (map::erase(iterator)): Add abi-tag so that
C++11 version mangles differently from incompatible C++98 version.
* include/debug/multimap.h (multimap::erase(iterator)): Likewise.
* include/debug/multiset.h (multiset::erase(iterator))
(multiset::erase(const_iterator, const_iterator)): Likewise.
* include/debug/set.h (set::erase(iterator))
(multiset::erase(const_iterator, const_iterator)): Likewise.

From-SVN: r265313

libstdc++-v3/ChangeLog
libstdc++-v3/include/debug/map.h
libstdc++-v3/include/debug/multimap.h
libstdc++-v3/include/debug/multiset.h
libstdc++-v3/include/debug/set.h

index 5edbec9d36c78f14a8713d911a12d48a6604d595..ea4928f5a7873c1a1831a6948f3fae6d7c5561de 100644 (file)
@@ -1,3 +1,13 @@
+2018-10-19  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/debug/map.h (map::erase(iterator)): Add abi-tag so that
+       C++11 version mangles differently from incompatible C++98 version.
+       * include/debug/multimap.h (multimap::erase(iterator)): Likewise.
+       * include/debug/multiset.h (multiset::erase(iterator))
+       (multiset::erase(const_iterator, const_iterator)): Likewise.
+       * include/debug/set.h (set::erase(iterator))
+       (multiset::erase(const_iterator, const_iterator)): Likewise.
+
 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
 
        * testsuite/20_util/duration/cons/2.cc: Add -ffloat-store to fix
index 6821fc561e45227d0c884bb8f54823c3d0bf0c3d..cb29e9ee2a5ddb809821502cb1336fcf310e7a1c 100644 (file)
@@ -482,6 +482,7 @@ namespace __debug
        return { _Base::erase(__position.base()), this };
       }
 
+      _GLIBCXX_ABI_TAG_CXX11
       iterator
       erase(iterator __position)
       { return erase(const_iterator(__position)); }
index d16ed47ab743884c68dd1deba0739163feb54eeb..38e38c8c1cec965e3da3b021092032fccefb97cc 100644 (file)
@@ -361,6 +361,7 @@ namespace __debug
        return { _Base::erase(__position.base()), this };
       }
 
+      _GLIBCXX_ABI_TAG_CXX11
       iterator
       erase(iterator __position)
       { return erase(const_iterator(__position)); }
index bf154ecad6e0699aff51aa5390ce90bd0e5d044c..2dd2f731627858801fcae799acc9309303236e71 100644 (file)
@@ -324,6 +324,7 @@ namespace __debug
 #endif // C++17
 
 #if __cplusplus >= 201103L
+      _GLIBCXX_ABI_TAG_CXX11
       iterator
       erase(const_iterator __position)
       {
@@ -358,6 +359,7 @@ namespace __debug
       }
 
 #if __cplusplus >= 201103L
+      _GLIBCXX_ABI_TAG_CXX11
       iterator
       erase(const_iterator __first, const_iterator __last)
       {
index c406fb424f47d8be8b4bb13f41c31ff7297acebb..d8dbaf268a2b63a9efd48ba561558da453aefedd 100644 (file)
@@ -338,6 +338,7 @@ namespace __debug
 #endif // C++17
 
 #if __cplusplus >= 201103L
+      _GLIBCXX_ABI_TAG_CXX11
       iterator
       erase(const_iterator __position)
       {
@@ -370,6 +371,7 @@ namespace __debug
       }
 
 #if __cplusplus >= 201103L
+      _GLIBCXX_ABI_TAG_CXX11
       iterator
       erase(const_iterator __first, const_iterator __last)
       {