From f3245887551932de6aba1aa3e9f911b78a57b5ef Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 19 Oct 2018 22:50:15 +0100 Subject: [PATCH] Skip tests for GNU extensions when testing with strict mode Tests for the implicit allocator rebinding extension will fail if the extension is disabled, so skip them. * testsuite/23_containers/array/requirements/explicit_instantiation/ 3.cc: Skip test when compiled with a -std=c++NN strict mode. * testsuite/23_containers/deque/requirements/explicit_instantiation/ 3.cc: Likewise. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/list/requirements/explicit_instantiation/ 3.cc: Likewise. * testsuite/23_containers/map/requirements/explicit_instantiation/ 3.cc: Likewise. * testsuite/23_containers/multimap/requirements/explicit_instantiation/ 3.cc: Likewise. * testsuite/23_containers/multiset/requirements/explicit_instantiation/ 3.cc: Likewise. * testsuite/23_containers/set/requirements/explicit_instantiation/ 3.cc: Likewise. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/3.cc: Likewise. * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/ 3.cc: Likewise. * testsuite/23_containers/vector/requirements/explicit_instantiation/ 3.cc: Likewise. From-SVN: r265334 --- libstdc++-v3/ChangeLog | 29 +++++++++++++++++++ .../requirements/explicit_instantiation/3.cc | 2 ++ .../requirements/explicit_instantiation/3.cc | 3 +- .../requirements/explicit_instantiation/3.cc | 3 +- .../requirements/explicit_instantiation/3.cc | 3 +- .../requirements/explicit_instantiation/3.cc | 3 +- .../requirements/explicit_instantiation/3.cc | 3 +- .../requirements/explicit_instantiation/3.cc | 3 +- .../requirements/explicit_instantiation/3.cc | 3 +- .../requirements/explicit_instantiation/3.cc | 4 +++ .../requirements/explicit_instantiation/3.cc | 4 +++ .../requirements/explicit_instantiation/3.cc | 4 +++ .../requirements/explicit_instantiation/3.cc | 4 +++ .../ext_pointer/explicit_instantiation/3.cc | 3 ++ .../requirements/explicit_instantiation/3.cc | 3 +- 15 files changed, 66 insertions(+), 8 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e0265c51a4a..0399ec68209 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,34 @@ 2018-10-19 Jonathan Wakely + * testsuite/23_containers/array/requirements/explicit_instantiation/ + 3.cc: Skip test when compiled with a -std=c++NN strict mode. + * testsuite/23_containers/deque/requirements/explicit_instantiation/ + 3.cc: Likewise. + * testsuite/23_containers/forward_list/requirements/ + explicit_instantiation/3.cc: Likewise. + * testsuite/23_containers/list/requirements/explicit_instantiation/ + 3.cc: Likewise. + * testsuite/23_containers/map/requirements/explicit_instantiation/ + 3.cc: Likewise. + * testsuite/23_containers/multimap/requirements/explicit_instantiation/ + 3.cc: Likewise. + * testsuite/23_containers/multiset/requirements/explicit_instantiation/ + 3.cc: Likewise. + * testsuite/23_containers/set/requirements/explicit_instantiation/ + 3.cc: Likewise. + * testsuite/23_containers/unordered_map/requirements/ + explicit_instantiation/3.cc: Likewise. + * testsuite/23_containers/unordered_multimap/requirements/ + explicit_instantiation/3.cc: Likewise. + * testsuite/23_containers/unordered_multiset/requirements/ + explicit_instantiation/3.cc: Likewise. + * testsuite/23_containers/unordered_set/requirements/ + explicit_instantiation/3.cc: Likewise. + * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/ + 3.cc: Likewise. + * testsuite/23_containers/vector/requirements/explicit_instantiation/ + 3.cc: Likewise. + * testsuite/23_containers/deque/48101_neg.cc: Prune additional errors printed when __STRICT_ANSI__ is defined. * testsuite/23_containers/forward_list/48101_neg.cc: Likewise. diff --git a/libstdc++-v3/testsuite/23_containers/array/requirements/explicit_instantiation/3.cc b/libstdc++-v3/testsuite/23_containers/array/requirements/explicit_instantiation/3.cc index 56c6492c176..000281c6c56 100644 --- a/libstdc++-v3/testsuite/23_containers/array/requirements/explicit_instantiation/3.cc +++ b/libstdc++-v3/testsuite/23_containers/array/requirements/explicit_instantiation/3.cc @@ -1,4 +1,5 @@ // { dg-do compile { target c++11 } } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // 2010-05-20 Paolo Carlini // @@ -20,6 +21,7 @@ // . // This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). #include #include 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 ced9c45d0cf..22aa6cf836f 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 @@ -15,12 +15,13 @@ // with this library; see the file COPYING3. If not see // . - // This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). #include // { dg-do compile } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // libstdc++/21770 template class std::deque >; 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 097cee38d3d..808b5912c3b 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 @@ -16,12 +16,13 @@ // with this library; see the file COPYING3. If not see // . - // This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). #include // { dg-do compile { target c++11 } } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // libstdc++/21770 template class std::forward_list >; 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 9fb49859bed..33a3315b84c 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 @@ -15,12 +15,13 @@ // with this library; see the file COPYING3. If not see // . - // This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). #include // { dg-do compile } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // libstdc++/21770 template class std::list >; 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 eed10231e60..def50c608e7 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 @@ -15,12 +15,13 @@ // with this library; see the file COPYING3. If not see // . - // This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). #include // { dg-do compile } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // libstdc++/21770 template class std::map, std::allocator >; 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 0dcf96219e4..af33f7c67f6 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 @@ -15,12 +15,13 @@ // with this library; see the file COPYING3. If not see // . - // This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). #include // { dg-do compile } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // libstdc++/21770 template class std::multimap, std::allocator >; 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 366f9a6d1ec..18b20b61e8f 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 @@ -15,12 +15,13 @@ // with this library; see the file COPYING3. If not see // . - // This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). #include // { dg-do compile } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // libstdc++/21770 template class std::multiset, std::allocator >; 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 cd5c0969294..a51bf47da9e 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 @@ -15,12 +15,13 @@ // with this library; see the file COPYING3. If not see // . - // This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). #include // { dg-do compile } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // libstdc++/21770 template class std::set, std::allocator >; 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 1332d76ec11..09e2267b666 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,4 +1,5 @@ // { dg-do compile { target c++11 } } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // Copyright (C) 2007-2018 Free Software Foundation, Inc. // @@ -17,6 +18,9 @@ // along with this library; see the file COPYING3. If not see // . +// This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). + #include using namespace std; 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 024b4394b19..64c13e5d34d 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,4 +1,5 @@ // { dg-do compile { target c++11 } } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // Copyright (C) 2007-2018 Free Software Foundation, Inc. // @@ -17,6 +18,9 @@ // along with this library; see the file COPYING3. If not see // . +// This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). + #include using namespace std; 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 ebbb62767e7..71189548490 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,4 +1,5 @@ // { dg-do compile { target c++11 } } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // Copyright (C) 2007-2018 Free Software Foundation, Inc. // @@ -17,6 +18,9 @@ // along with this library; see the file COPYING3. If not see // . +// This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). + #include using namespace std; 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 f1b6d97554e..892f5528bd3 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,4 +1,5 @@ // { dg-do compile { target c++11 } } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // Copyright (C) 2007-2018 Free Software Foundation, Inc. // @@ -17,6 +18,9 @@ // along with this library; see the file COPYING3. If not see // . +// This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). + #include using namespace std; 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 bbb4e1bfe11..b067404b963 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 @@ -17,11 +17,14 @@ // with this library; see the file COPYING3. If not see // . +// This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). #include #include // { dg-do compile } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // libstdc++/21770 template class std::vector >; 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 d3a5682b877..3d41864e63c 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 @@ -15,12 +15,13 @@ // with this library; see the file COPYING3. If not see // . - // This file tests explicit instantiation of library containers +// with an allocator for a different value_type (which is a GNU extension). #include // { dg-do compile } +// { dg-skip-if "no extensions in strict dialects" { *-*-* } { "-std=c++*" } } // libstdc++/21770 template class std::vector >;