[gcc(refs/vendors/ibm/heads/gcc-9)] Fix more tests that fail in C++2a mode

Peter Bergner bergner@gcc.gnu.org
Tue Feb 4 20:47:00 GMT 2020


https://gcc.gnu.org/g:20bce52d369282fb3ac90901b5d58733953a8217

commit 20bce52d369282fb3ac90901b5d58733953a8217
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Oct 24 13:54:40 2019 +0100

    Fix more tests that fail in C++2a mode
    
    Backport from mainline
    2019-06-06  Jonathan Wakely  <jwakely@redhat.com>
    
    	* testsuite/23_containers/unordered_map/requirements/debug_container.cc:
    	Do not test allocator rebinding extension for C++2a.
    	* testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
    	dg-do directive for C++17 and C++2a.
    
    From-SVN: r277385

Diff:
---
 libstdc++-v3/ChangeLog                                            | 8 ++++++++
 .../23_containers/unordered_map/requirements/debug_container.cc   | 2 +-
 .../testsuite/23_containers/unordered_set/allocator/ext_ptr.cc    | 3 ++-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 256d5d7..ca192d1 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,6 +1,14 @@
 2019-10-24  Jonathan Wakely  <jwakely@redhat.com>
 
 	Backport from mainline
+	2019-06-06  Jonathan Wakely  <jwakely@redhat.com>
+
+	* testsuite/23_containers/unordered_map/requirements/debug_container.cc:
+	Do not test allocator rebinding extension for C++2a.
+	* testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
+	dg-do directive for C++17 and C++2a.
+
+	Backport from mainline
 	2019-05-23  Jonathan Wakely  <jwakely@redhat.com>
 
 	* testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug_container.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug_container.cc
index d6afae9..9038028 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug_container.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug_container.cc
@@ -30,7 +30,7 @@ template class __gnu_debug::unordered_map<string, float>;
 template class __gnu_debug::unordered_map<string, int,
                                           hash<string>, equal_to<string>, 
                                           allocator<pair<const string, int>>>;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
 template class __gnu_debug::unordered_map<string, float,
                                           hash<string>, equal_to<string>, 
                                           allocator<char>>;
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/allocator/ext_ptr.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/allocator/ext_ptr.cc
index 5daa456..b7a63c5 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/allocator/ext_ptr.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/allocator/ext_ptr.cc
@@ -15,7 +15,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-do run { target c++11 } }
+// { dg-do run { target { c++11_only || c++14_only } } }
+// { dg-do compile { target c++17 } }
 
 #include <unordered_set>
 #include <memory>



More information about the Libstdc++-cvs mailing list