Fix tests that fail in C++2a mode
authorJonathan Wakely <jwakely@redhat.com>
Thu, 6 Jun 2019 13:36:27 +0000 (14:36 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 6 Jun 2019 13:36:27 +0000 (14:36 +0100)
The GNU extension that allows using the wrong allocator type with a
container is disabled for C++2a mode, because the standard now requires
a diagnostic. Fix the tests that fail when -std=gnu++2a is used.

Also remove some reundant tests that are duplicates of another test
except for a target specifier of c++11. Those tests previously set
-std=gnu++11 explicitly but that was replaced globally with a target
specifier. These tests existed to verify that explicit instantiation
worked for both C++98 and C++11 modes, but now do nothing because both
copies of the test use -std=gnu++14 by default. Instead of duplicating
the test we should be regularly running the whole testsuite with
different -std options.

* testsuite/23_containers/deque/requirements/explicit_instantiation/
1_c++0x.cc: Remove redundant test.
* testsuite/23_containers/deque/requirements/explicit_instantiation/
2.cc: Use target selector instead of preprocessor condition.
* testsuite/23_containers/deque/requirements/explicit_instantiation/
3.cc: Do not run test for C++2a.
* testsuite/23_containers/forward_list/requirements/
explicit_instantiation/3.cc: Likewise.
* testsuite/23_containers/forward_list/requirements/
explicit_instantiation/5.cc: Do not test allocator rebinding extension
for C++2a.
* testsuite/23_containers/list/requirements/explicit_instantiation/
1_c++0x.cc: Remove redundant test.
* testsuite/23_containers/list/requirements/explicit_instantiation/
2.cc: Use target selector instead of preprocessor condition.
* testsuite/23_containers/list/requirements/explicit_instantiation/
3.cc: Do not run test for C++2a.
* testsuite/23_containers/list/requirements/explicit_instantiation/
5.cc: Do not test allocator rebinding extension for C++2a.
* testsuite/23_containers/map/requirements/explicit_instantiation/
1_c++0x.cc: Remove redundant test.
* testsuite/23_containers/map/requirements/explicit_instantiation/
2.cc: Adjust comment.
* testsuite/23_containers/map/requirements/explicit_instantiation/
3.cc: Do not run test for C++2a.
* testsuite/23_containers/map/requirements/explicit_instantiation/
5.cc: Do not test allocator rebinding extension for C++2a.
* testsuite/23_containers/multimap/requirements/explicit_instantiation/
1_c++0x.cc: Remove redundant test.
* testsuite/23_containers/multimap/requirements/explicit_instantiation/
3.cc: Do not run test for C++2a.
* testsuite/23_containers/multimap/requirements/explicit_instantiation/
5.cc: Do not test allocator rebinding extension for C++2a.
* testsuite/23_containers/multiset/requirements/explicit_instantiation/
3.cc: Do not run test for C++2a.
* testsuite/23_containers/multiset/requirements/explicit_instantiation/
5.cc: Do not test allocator rebinding extension for C++2a.
* testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
Do not run test for C++2a.
* testsuite/23_containers/set/requirements/explicit_instantiation/
1_c++0x.cc: Remove redundant test.
* testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
Do not test allocator rebinding extension for C++2a.
* testsuite/23_containers/unordered_map/requirements/
explicit_instantiation/3.cc: Likewise.
* testsuite/23_containers/unordered_map/requirements/
explicit_instantiation/5.cc: Do not test allocator rebinding extension
for C++2a.
* testsuite/23_containers/unordered_multimap/requirements/
explicit_instantiation/3.cc: Do not run test for C++2a.
* testsuite/23_containers/unordered_multimap/requirements/
explicit_instantiation/5.cc: Do not test allocator rebinding extension
for C++2a.
* testsuite/23_containers/unordered_multiset/requirements/
explicit_instantiation/3.cc: Do not run test for C++2a.
* testsuite/23_containers/unordered_multiset/requirements/
explicit_instantiation/5.cc: Do not test allocator rebinding extension
for C++2a.
* testsuite/23_containers/unordered_set/requirements/
explicit_instantiation/3.cc: Do not run test for C++2a.
* testsuite/23_containers/unordered_set/requirements/
explicit_instantiation/5.cc: Do not test allocator rebinding extension
for C++2a.
* testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
2.cc: Remove redundant test.
* testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
3.cc: Do not run test for C++2a.
* testsuite/23_containers/vector/requirements/explicit_instantiation/
3.cc: Likewise.

From-SVN: r272001

33 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/1_c++0x.cc [deleted file]
libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc
libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/3.cc
libstdc++-v3/testsuite/23_containers/forward_list/requirements/explicit_instantiation/3.cc
libstdc++-v3/testsuite/23_containers/forward_list/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/1_c++0x.cc [deleted file]
libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc
libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/3.cc
libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/1_c++0x.cc [deleted file]
libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc
libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/3.cc
libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/1_c++0x.cc [deleted file]
libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/3.cc
libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/3.cc
libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/1_c++0x.cc [deleted file]
libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/3.cc
libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/3.cc
libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/3.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/3.cc
libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/3.cc
libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/vector/ext_pointer/explicit_instantiation/2.cc [deleted file]
libstdc++-v3/testsuite/23_containers/vector/ext_pointer/explicit_instantiation/3.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/3.cc

index 3dd82b637ff6c5b7fcb26f34ce0b8164aa0195a9..afb41cb83a58d02c9037b834a01f9b828e8a974b 100644 (file)
@@ -1,5 +1,75 @@
 2019-06-06  Jonathan Wakely  <jwakely@redhat.com>
 
+       * testsuite/23_containers/deque/requirements/explicit_instantiation/
+       1_c++0x.cc: Remove redundant test.
+       * testsuite/23_containers/deque/requirements/explicit_instantiation/
+       2.cc: Use target selector instead of preprocessor condition.
+       * testsuite/23_containers/deque/requirements/explicit_instantiation/
+       3.cc: Do not run test for C++2a.
+       * testsuite/23_containers/forward_list/requirements/
+       explicit_instantiation/3.cc: Likewise.
+       * testsuite/23_containers/forward_list/requirements/
+       explicit_instantiation/5.cc: Do not test allocator rebinding extension
+       for C++2a.
+       * testsuite/23_containers/list/requirements/explicit_instantiation/
+       1_c++0x.cc: Remove redundant test.
+       * testsuite/23_containers/list/requirements/explicit_instantiation/
+       2.cc: Use target selector instead of preprocessor condition.
+       * testsuite/23_containers/list/requirements/explicit_instantiation/
+       3.cc: Do not run test for C++2a.
+       * testsuite/23_containers/list/requirements/explicit_instantiation/
+       5.cc: Do not test allocator rebinding extension for C++2a.
+       * testsuite/23_containers/map/requirements/explicit_instantiation/
+       1_c++0x.cc: Remove redundant test.
+       * testsuite/23_containers/map/requirements/explicit_instantiation/
+       2.cc: Adjust comment.
+       * testsuite/23_containers/map/requirements/explicit_instantiation/
+       3.cc: Do not run test for C++2a.
+       * testsuite/23_containers/map/requirements/explicit_instantiation/
+       5.cc: Do not test allocator rebinding extension for C++2a.
+       * testsuite/23_containers/multimap/requirements/explicit_instantiation/
+       1_c++0x.cc: Remove redundant test.
+       * testsuite/23_containers/multimap/requirements/explicit_instantiation/
+       3.cc: Do not run test for C++2a.
+       * testsuite/23_containers/multimap/requirements/explicit_instantiation/
+       5.cc: Do not test allocator rebinding extension for C++2a.
+       * testsuite/23_containers/multiset/requirements/explicit_instantiation/
+       3.cc: Do not run test for C++2a.
+       * testsuite/23_containers/multiset/requirements/explicit_instantiation/
+       5.cc: Do not test allocator rebinding extension for C++2a.
+       * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
+       Do not run test for C++2a.
+       * testsuite/23_containers/set/requirements/explicit_instantiation/
+       1_c++0x.cc: Remove redundant test.
+       * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
+       Do not test allocator rebinding extension for C++2a.
+       * testsuite/23_containers/unordered_map/requirements/
+       explicit_instantiation/3.cc: Likewise.
+       * testsuite/23_containers/unordered_map/requirements/
+       explicit_instantiation/5.cc: Do not test allocator rebinding extension
+       for C++2a.
+       * testsuite/23_containers/unordered_multimap/requirements/
+       explicit_instantiation/3.cc: Do not run test for C++2a.
+       * testsuite/23_containers/unordered_multimap/requirements/
+       explicit_instantiation/5.cc: Do not test allocator rebinding extension
+       for C++2a.
+       * testsuite/23_containers/unordered_multiset/requirements/
+       explicit_instantiation/3.cc: Do not run test for C++2a.
+       * testsuite/23_containers/unordered_multiset/requirements/
+       explicit_instantiation/5.cc: Do not test allocator rebinding extension
+       for C++2a.
+       * testsuite/23_containers/unordered_set/requirements/
+       explicit_instantiation/3.cc: Do not run test for C++2a.
+       * testsuite/23_containers/unordered_set/requirements/
+       explicit_instantiation/5.cc: Do not test allocator rebinding extension
+       for C++2a.
+       * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
+       2.cc: Remove redundant test.
+       * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
+       3.cc: Do not run test for C++2a.
+       * testsuite/23_containers/vector/requirements/explicit_instantiation/
+       3.cc: Likewise.
+
        * include/std/type_traits (is_empty, is_polymorphic, is_final)
        (is_abstract, is_aggregate): Remove static_assert.
        * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/1_c++0x.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/1_c++0x.cc
deleted file mode 100644 (file)
index 83dba98..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// { dg-do compile { target c++11 } }
-
-// Copyright (C) 2009-2019 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// <http://www.gnu.org/licenses/>.
-
-// This file tests explicit instantiation of library containers
-
-#include <deque>
-
-template class std::deque<int>;
index bbd84a53318381c7eb3045560f06bf83ff9dffa0..c8f8b7985b88a80bc2b404c66c3917dd5b3997e8 100644 (file)
 #include <deque>
 #include <testsuite_api.h>
 
-// { dg-do compile }
+// { dg-do compile { target c++98_only } }
 
-// N.B. In C++0x mode we cannot instantiate with T == NonDefaultConstructible
-// because of 23.3.2.1.4
-#if __cplusplus < 201103L
+// N.B. Since C++11 we cannot instantiate with T == NonDefaultConstructible
+// because of [deque.cons] p4: "Requires: T shall be DefaultConstructible."
 template class std::deque<__gnu_test::NonDefaultConstructible>;
-#endif
index f6fd591f9d0665a1790e45f78438a8838be72ebb..0ae076876a8b5de49b25af25414f9866ecae913f 100644 (file)
@@ -21,7 +21,8 @@
 #include <deque>
 
 // { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // libstdc++/21770
 template class std::deque<int, std::allocator<char> >;
index 0410d7ed4cf0007d64c0c00cc32cab5125670aed..037fc60a21bcdb122742781476d0536ade3af91e 100644 (file)
@@ -22,7 +22,8 @@
 #include <forward_list>
 
 // { dg-do compile { target c++11 } }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // libstdc++/21770
 template class std::forward_list<int, std::allocator<char> >;
index fff2e00ae2719b023c3d075a11a9bcfc72c61b98..0ad9df9ce8defda95b2ed7a5681597caecfeda4b 100644 (file)
@@ -25,6 +25,6 @@
 
 // libstdc++/50118
 template class std::forward_list<int, __gnu_test::ExplicitConsAlloc<int>>;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
 template class std::forward_list<int, __gnu_test::ExplicitConsAlloc<char>>;
 #endif
diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/1_c++0x.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/1_c++0x.cc
deleted file mode 100644 (file)
index 830ceec..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// { dg-do compile { target c++11 } }
-
-// Copyright (C) 2009-2019 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// <http://www.gnu.org/licenses/>.
-
-// This file tests explicit instantiation of library containers
-
-#include <list>
-
-template class std::list<int>;
index 8b279df0623d144bfb3bca508562195e41963368..35818d987216880dd6194bed94c5b9297e3f71a0 100644 (file)
 #include <list>
 #include <testsuite_api.h>
 
-// { dg-do compile }
+// { dg-do compile { target c++98_only } }
 
-// N.B. In C++0x mode we cannot instantiate with T == NonDefaultConstructible
-// because of 23.3.4.1.4
-#if __cplusplus < 201103L
+// N.B. Since C++11 we cannot instantiate with T == NonDefaultConstructible
+// because of [list.cons] p4: "Requires: T shall be DefaultConstructible."
 template class std::list<__gnu_test::NonDefaultConstructible>;
-#endif
index 818d20f26549dfcad7cc46650e2702f5ad0a5421..e40e9b2ec972c6a870855ec22f58c7c5187754d4 100644 (file)
@@ -21,7 +21,8 @@
 #include <list>
 
 // { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // libstdc++/21770
 template class std::list<int, std::allocator<char> >;
index b469fa6a801a256898cea0c22accd4b5d50a1ab0..82107199df4e6a38d2361f581fb03266c56b3e6c 100644 (file)
@@ -24,6 +24,6 @@
 
 // libstdc++/50118
 template class std::list<int, __gnu_test::ExplicitConsAlloc<int> >;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
 template class std::list<int, __gnu_test::ExplicitConsAlloc<char> >;
 #endif
diff --git a/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/1_c++0x.cc b/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/1_c++0x.cc
deleted file mode 100644 (file)
index ea90279..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// { dg-do compile { target c++11 } }
-
-// Copyright (C) 2009-2019 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// <http://www.gnu.org/licenses/>.
-
-// This file tests explicit instantiation of library containers
-
-#include <map>
-
-template class std::map<int, double>;
index b887697d6f71af2ad13b6053ee56d65947a1d61f..6ce727fd9eb1d247a074e8215f3aefb5a828f6be 100644 (file)
@@ -25,5 +25,5 @@
 // { dg-do compile }
 
 // N.B. We cannot instantiate with T == NonDefaultConstructible
-// because of 23.3.1.2.
+// because of [map.access] p2: "mapped_type shall be DefaultConstructible."
 template class std::map<__gnu_test::NonDefaultConstructible, double>;
index 23b31019b729d73912c14035a5cfd99854b04e4d..8e58ba7e43db4f060300dca5b42b2a1b16cc6586 100644 (file)
@@ -21,7 +21,8 @@
 #include <map>
 
 // { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // libstdc++/21770
 template class std::map<int, double, std::less<int>, std::allocator<char> >;
index 0076bb6f9f4914c4afdfb27ba268344c1dd9750f..1793bb08ecbeb5eebb6e86910b2ef6f7a556b87a 100644 (file)
@@ -27,7 +27,7 @@ using __gnu_test::ExplicitConsAlloc;
 // libstdc++/50118
 template class std::map<int, int, std::less<int>,
                        ExplicitConsAlloc<std::pair<const int, int> > >;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
 template class std::map<int, int, std::less<int>,
                        ExplicitConsAlloc<char> >;
 #endif
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/1_c++0x.cc b/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/1_c++0x.cc
deleted file mode 100644 (file)
index 8e1261a..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// { dg-do compile { target c++11 } }
-
-// Copyright (C) 2009-2019 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// <http://www.gnu.org/licenses/>.
-
-// This file tests explicit instantiation of library containers
-
-#include <map>
-
-template class std::multimap<int, double>;
index 19f9ea43fdb0fcfa329bf407887974826dadd6f6..8b828163e178f23328d797898ac820575ee6888f 100644 (file)
@@ -21,7 +21,8 @@
 #include <map>
 
 // { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // libstdc++/21770
 template class std::multimap<int, double, std::less<int>, std::allocator<char> >;
index 4d97d62cdc85fe452dfe5271f6c98eadeb9b015b..fb7784550e7471c082623f48d36b969aeaab8555 100644 (file)
@@ -27,7 +27,7 @@ using __gnu_test::ExplicitConsAlloc;
 // libstdc++/50118
 template class std::multimap<int, int, std::less<int>,
                             ExplicitConsAlloc<std::pair<const int, int> > >;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
 template class std::multimap<int, int, std::less<int>,
                             ExplicitConsAlloc<char> >;
 #endif
index f42ef24569d8e6f52c41158e70a142d5a848e3ef..d6e4b7f306030874b7ce26fe27ec6b5a2fd6a995 100644 (file)
@@ -21,7 +21,8 @@
 #include <set>
 
 // { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // libstdc++/21770
 template class std::multiset<int, std::less<int>, std::allocator<char> >;
index 6716556ea84975a81f5a98dc056efc3e3daca985..899055ba385e581a663ff7a6650ba1ddd4692b0b 100644 (file)
@@ -25,7 +25,7 @@
 // libstdc++/50118
 template class std::multiset<int, std::less<int>,
                             __gnu_test::ExplicitConsAlloc<int> >;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
 template class std::multiset<int, std::less<int>,
                             __gnu_test::ExplicitConsAlloc<char> >;
 #endif
diff --git a/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/1_c++0x.cc b/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/1_c++0x.cc
deleted file mode 100644 (file)
index e053f8d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// { dg-do compile { target c++11 } }
-
-// Copyright (C) 2009-2019 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// <http://www.gnu.org/licenses/>.
-
-// This file tests explicit instantiation of library containers
-
-#include <set>
-
-template class std::set<int>;
index ff14e9163a2f1de658c41cf48d7429373a54a56b..2e8a80e58a003ee5152fcb5f12bb7978cc7e4e0e 100644 (file)
@@ -21,7 +21,8 @@
 #include <set>
 
 // { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // libstdc++/21770
 template class std::set<int, std::less<int>, std::allocator<char> >;
index d504443c80661075bd0d75c1e7ad98e9e36a27a4..a05c2f856ecd098ac204386d6128cd1f2c6fe785 100644 (file)
@@ -25,7 +25,7 @@
 // libstdc++/50118
 template class std::set<int, std::less<int>,
                        __gnu_test::ExplicitConsAlloc<int> >;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
 template class std::set<int, std::less<int>,
                        __gnu_test::ExplicitConsAlloc<char> >;
 #endif
index 8939d5713b4ef9438dc95b2e2ee734569f5e42f4..bfcb046ae7a72d2409d4cc40918c73337a762004 100644 (file)
@@ -1,5 +1,6 @@
 // { dg-do compile { target c++11 } }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // Copyright (C) 2007-2019 Free Software Foundation, Inc.
 //
index cc4f8473b232fd8ec045f9c3e1afe53b745a248e..ee91d16804da9f7b49e21b1e737c84873fab6fa1 100644 (file)
@@ -28,7 +28,7 @@ using __gnu_test::ExplicitConsAlloc;
 // libstdc++/50118
 template class std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
                                  ExplicitConsAlloc<std::pair<const int, int>>>;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
 template class std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
                                  ExplicitConsAlloc<char>>;
 #endif
index faec6aec74ccd48095639935dc9de0f483a2e415..101449c915b06905b504a2f1478471d29a86d3b0 100644 (file)
@@ -1,5 +1,6 @@
 // { dg-do compile { target c++11 } }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // Copyright (C) 2007-2019 Free Software Foundation, Inc.
 //
index 885ab2212d63961bae799fa5fe706d32431c1078..0a5848b008776be3f2d0cf511e903cc993b23396 100644 (file)
@@ -28,7 +28,7 @@ using __gnu_test::ExplicitConsAlloc;
 template class
   std::unordered_multimap<int, int, std::hash<int>, std::equal_to<int>,
                          ExplicitConsAlloc<std::pair<const int, int>>>;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
 template class std::unordered_multimap<int, int, std::hash<int>,
                                       std::equal_to<int>,
                                       ExplicitConsAlloc<char>>;
index bb1154b642387db69690a7173bd7dab74d5140f6..dc9afeb292e2f8181b68cc1c994f06eaccd64557 100644 (file)
@@ -1,5 +1,6 @@
 // { dg-do compile { target c++11 } }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // Copyright (C) 2007-2019 Free Software Foundation, Inc.
 //
index 48498a340d1e3cfd00d713c035d1e08b572319fa..e9e1bcb244837a6ed3fa3de432772f790b7f44df 100644 (file)
@@ -26,7 +26,7 @@
 // libstdc++/50118
 template class std::unordered_multiset<int, std::hash<int>, std::equal_to<int>,
                                       __gnu_test::ExplicitConsAlloc<int>>;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
 template class std::unordered_multiset<int, std::hash<int>, std::equal_to<int>,
                                       __gnu_test::ExplicitConsAlloc<char>>;
 #endif
index b3f43f55694c9e16a491cb917b69344ab6c859cb..2f7193493bd828a5a04751a66388221fd417b3af 100644 (file)
@@ -1,5 +1,6 @@
 // { dg-do compile { target c++11 } }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // Copyright (C) 2007-2019 Free Software Foundation, Inc.
 //
index 3e4f4ff5180b942f5191a229970c927b82137810..c58b68fca785587a6ff3b40942267f5f7f485ad4 100644 (file)
@@ -26,7 +26,7 @@
 // libstdc++/50118
 template class std::unordered_set<int, std::hash<int>, std::equal_to<int>,
                                  __gnu_test::ExplicitConsAlloc<int>>;
-#ifndef __STRICT_ANSI__
+#if !defined __STRICT_ANSI__ && __cplusplus <= 201703L
 template class std::unordered_set<int, std::hash<int>, std::equal_to<int>,
                                  __gnu_test::ExplicitConsAlloc<char>>;
 #endif
diff --git a/libstdc++-v3/testsuite/23_containers/vector/ext_pointer/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/vector/ext_pointer/explicit_instantiation/2.cc
deleted file mode 100644 (file)
index 23510b4..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Test for Container using non-standard pointer types.
-
-// Copyright (C) 2011-2019 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// <http://www.gnu.org/licenses/>.
-
-
-#include <vector>
-#include <ext/extptr_allocator.h>
-
-// { dg-do compile { target c++11 } }
-
-template class std::vector<int, __gnu_cxx::_ExtPtr_allocator<int> >;
index d7ba99a855216946c1661b439443b753fb022fc2..7ff2037e77fea897728ca26d4235e4e04fe8be36 100644 (file)
@@ -24,7 +24,8 @@
 #include <ext/extptr_allocator.h>
 
 // { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // libstdc++/21770
 template class std::vector<int, __gnu_cxx::_ExtPtr_allocator<char> >;
index 09237ca427714832e1b75d9efde627c9650a18ca..97582de58f7ed3b8c80005ac2352918406e0cf8f 100644 (file)
@@ -21,7 +21,8 @@
 #include <vector>
 
 // { dg-do compile }
-// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } }
+// The extension that implicitly rebinds allocators is in gnu++98/11/14/17 only
+// { dg-skip-if "" { *-*-* } { "-std=c++*" "-std=gnu++2*" } }
 
 // libstdc++/21770
 template class std::vector<int, std::allocator<char> >;