diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-06-06 14:36:27 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-06-06 14:36:27 +0100 |
commit | a2dbc0bf2aa42f0f078d0d46f7d9cdafc5383d93 (patch) | |
tree | 1c9ec0bc1230dbc37c3b3cf22c6a47c65b96f370 | |
parent | 209ee62421fdeb177bdac29e670bc9b930bef4a3 (diff) | |
download | gcc-a2dbc0bf2aa42f0f078d0d46f7d9cdafc5383d93.zip gcc-a2dbc0bf2aa42f0f078d0d46f7d9cdafc5383d93.tar.gz gcc-a2dbc0bf2aa42f0f078d0d46f7d9cdafc5383d93.tar.bz2 |
Fix tests that fail in C++2a mode
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, 113 insertions, 180 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3dd82b6..afb41cb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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 index 83dba98..0000000 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/1_c++0x.cc +++ /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>; diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc index bbd84a5..c8f8b79 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc @@ -21,10 +21,8 @@ #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 diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/3.cc index f6fd591..0ae0768 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/3.cc @@ -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> >; diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/explicit_instantiation/3.cc index 0410d7e..037fc60 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/explicit_instantiation/3.cc @@ -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> >; diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/explicit_instantiation/5.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/explicit_instantiation/5.cc index fff2e00..0ad9df9 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/explicit_instantiation/5.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/explicit_instantiation/5.cc @@ -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 index 830ceec..0000000 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/1_c++0x.cc +++ /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>; diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc index 8b279df..35818d9 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc @@ -21,10 +21,8 @@ #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 diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/3.cc index 818d20f..e40e9b2 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/3.cc @@ -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> >; diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/5.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/5.cc index b469fa6..8210719 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/5.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/5.cc @@ -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 index ea90279..0000000 --- a/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/1_c++0x.cc +++ /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>; diff --git a/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc index b887697..6ce727f 100644 --- a/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc @@ -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>; diff --git a/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/3.cc index 23b3101..8e58ba7 100644 --- a/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/3.cc @@ -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> >; diff --git a/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/5.cc b/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/5.cc index 0076bb6..1793bb0 100644 --- a/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/5.cc +++ b/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/5.cc @@ -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 index 8e1261a..0000000 --- a/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/1_c++0x.cc +++ /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>; diff --git a/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/3.cc index 19f9ea4..8b82816 100644 --- a/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/3.cc @@ -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> >; diff --git a/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/5.cc b/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/5.cc index 4d97d62..fb77845 100644 --- a/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/5.cc +++ b/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/5.cc @@ -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 diff --git a/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/3.cc index f42ef24..d6e4b7f 100644 --- a/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/3.cc @@ -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> >; diff --git a/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/5.cc b/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/5.cc index 6716556..899055b 100644 --- a/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/5.cc +++ b/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/5.cc @@ -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 index e053f8d..0000000 --- a/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/1_c++0x.cc +++ /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>; diff --git a/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/3.cc index ff14e91..2e8a80e 100644 --- a/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/3.cc @@ -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> >; diff --git a/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/5.cc b/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/5.cc index d504443..a05c2f8 100644 --- a/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/5.cc +++ b/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/5.cc @@ -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 diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/3.cc index 8939d57..bfcb046 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/3.cc @@ -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. // diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/5.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/5.cc index cc4f847..ee91d16 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/5.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/5.cc @@ -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 diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/3.cc index faec6ae..101449c 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/3.cc @@ -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. // diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/5.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/5.cc index 885ab22..0a5848b 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/5.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/5.cc @@ -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>>; diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/3.cc index bb1154b..dc9afeb 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/3.cc @@ -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. // diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/5.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/5.cc index 48498a3..e9e1bcb 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/5.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/5.cc @@ -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 diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/3.cc index b3f43f5..2f71934 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/3.cc @@ -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. // diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/5.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/5.cc index 3e4f4ff..c58b68f 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/5.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/5.cc @@ -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 index 23510b4..0000000 --- a/libstdc++-v3/testsuite/23_containers/vector/ext_pointer/explicit_instantiation/2.cc +++ /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> >; diff --git a/libstdc++-v3/testsuite/23_containers/vector/ext_pointer/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/vector/ext_pointer/explicit_instantiation/3.cc index d7ba99a..7ff2037 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/ext_pointer/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/ext_pointer/explicit_instantiation/3.cc @@ -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> >; diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/3.cc index 09237ca..97582de 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/3.cc @@ -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> >; |