From f8f39390375ab2e20ba58388f5ab282543ffa428 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 19 Oct 2018 22:49:49 +0100 Subject: [PATCH] Conditionally disable tests of non-standard extensions These tests include uses of the extension to allow allocators with the wrong value_type in containers. Skip those parts of the tests when __STRICT_ANIS__ is defined. * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/5.cc [__STRICT_ANSI__]: Don't test non-standard extension. * testsuite/23_containers/list/requirements/explicit_instantiation/ 5.cc [__STRICT_ANSI__]: Likewise. * testsuite/23_containers/map/requirements/explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise. * testsuite/23_containers/multimap/requirements/explicit_instantiation/ 5.cc [__STRICT_ANSI__]: Likewise. * testsuite/23_containers/multiset/requirements/explicit_instantiation/ 5.cc [__STRICT_ANSI__]: Likewise. * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise. * testsuite/23_containers/unordered_map/requirements/debug_container.cc [__STRICT_ANSI__]: Likewise. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise. From-SVN: r265332 --- libstdc++-v3/ChangeLog | 24 +++++++++++++++++++ .../requirements/explicit_instantiation/5.cc | 2 ++ .../requirements/explicit_instantiation/5.cc | 2 ++ .../requirements/explicit_instantiation/5.cc | 8 +++++-- .../requirements/explicit_instantiation/5.cc | 8 +++++-- .../requirements/explicit_instantiation/5.cc | 2 ++ .../requirements/explicit_instantiation/5.cc | 2 ++ .../requirements/debug_container.cc | 2 ++ .../requirements/explicit_instantiation/5.cc | 8 +++++-- .../requirements/explicit_instantiation/5.cc | 2 ++ .../requirements/explicit_instantiation/5.cc | 2 ++ .../requirements/explicit_instantiation/5.cc | 2 ++ 12 files changed, 58 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c7cdc005502..b3688f89a56 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,29 @@ 2018-10-19 Jonathan Wakely + * testsuite/23_containers/forward_list/requirements/ + explicit_instantiation/5.cc [__STRICT_ANSI__]: Don't test non-standard + extension. + * testsuite/23_containers/list/requirements/explicit_instantiation/ + 5.cc [__STRICT_ANSI__]: Likewise. + * testsuite/23_containers/map/requirements/explicit_instantiation/5.cc + [__STRICT_ANSI__]: Likewise. + * testsuite/23_containers/multimap/requirements/explicit_instantiation/ + 5.cc [__STRICT_ANSI__]: Likewise. + * testsuite/23_containers/multiset/requirements/explicit_instantiation/ + 5.cc [__STRICT_ANSI__]: Likewise. + * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc + [__STRICT_ANSI__]: Likewise. + * testsuite/23_containers/unordered_map/requirements/debug_container.cc + [__STRICT_ANSI__]: Likewise. + * testsuite/23_containers/unordered_map/requirements/ + explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise. + * testsuite/23_containers/unordered_multimap/requirements/ + explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise. + * testsuite/23_containers/unordered_multiset/requirements/ + explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise. + * testsuite/23_containers/unordered_set/requirements/ + explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise. + * testsuite/20_util/scoped_allocator/1.cc: Use allocator with correct value type for the container. * testsuite/23_containers/forward_list/cons/14.cc: Likewise. 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 2060ac7db6d..beb2da4f3ac 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,4 +25,6 @@ // libstdc++/50118 template class std::forward_list>; +#ifndef __STRICT_ANSI__ template class std::forward_list>; +#endif 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 c34afd0d42f..36d0ac33f13 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,4 +24,6 @@ // libstdc++/50118 template class std::list >; +#ifndef __STRICT_ANSI__ template class std::list >; +#endif 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 9dde5bca362..2e86fb03156 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 @@ -22,8 +22,12 @@ // { dg-do compile } +using __gnu_test::ExplicitConsAlloc; + // libstdc++/50118 template class std::map, - __gnu_test::ExplicitConsAlloc >; + ExplicitConsAlloc > >; +#ifndef __STRICT_ANSI__ template class std::map, - __gnu_test::ExplicitConsAlloc >; + ExplicitConsAlloc >; +#endif 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 00f987d1f43..655d3dc9f50 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 @@ -22,8 +22,12 @@ // { dg-do compile } +using __gnu_test::ExplicitConsAlloc; + // libstdc++/50118 template class std::multimap, - __gnu_test::ExplicitConsAlloc >; + ExplicitConsAlloc > >; +#ifndef __STRICT_ANSI__ template class std::multimap, - __gnu_test::ExplicitConsAlloc >; + ExplicitConsAlloc >; +#endif 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 0abadf4afa8..36a1c7e28b0 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,5 +25,7 @@ // libstdc++/50118 template class std::multiset, __gnu_test::ExplicitConsAlloc >; +#ifndef __STRICT_ANSI__ template class std::multiset, __gnu_test::ExplicitConsAlloc >; +#endif 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 cbbbcc1b6dc..f0edffe0a41 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,5 +25,7 @@ // libstdc++/50118 template class std::set, __gnu_test::ExplicitConsAlloc >; +#ifndef __STRICT_ANSI__ template class std::set, __gnu_test::ExplicitConsAlloc >; +#endif 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 6fe5d6f96d3..1af0f5a688a 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,6 +30,8 @@ template class __gnu_debug::unordered_map; template class __gnu_debug::unordered_map, equal_to, allocator>>; +#ifndef __STRICT_ANSI__ template class __gnu_debug::unordered_map, equal_to, allocator>; +#endif 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 afe3d648cd8..2bedfc28516 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 @@ -23,8 +23,12 @@ // { dg-do compile { target c++11 } } +using __gnu_test::ExplicitConsAlloc; + // libstdc++/50118 template class std::unordered_map, std::equal_to, - __gnu_test::ExplicitConsAlloc>; + ExplicitConsAlloc>>; +#ifndef __STRICT_ANSI__ template class std::unordered_map, std::equal_to, - __gnu_test::ExplicitConsAlloc>; + ExplicitConsAlloc>; +#endif 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 6cdf0f3f3ca..938cea5964d 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,6 +28,8 @@ using __gnu_test::ExplicitConsAlloc; template class std::unordered_multimap, std::equal_to, ExplicitConsAlloc>>; +#ifndef __STRICT_ANSI__ template class std::unordered_multimap, std::equal_to, ExplicitConsAlloc>; +#endif 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 5645a715db5..59b509b7782 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,5 +26,7 @@ // libstdc++/50118 template class std::unordered_multiset, std::equal_to, __gnu_test::ExplicitConsAlloc>; +#ifndef __STRICT_ANSI__ template class std::unordered_multiset, std::equal_to, __gnu_test::ExplicitConsAlloc>; +#endif 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 ae117ee772c..b3358c3a8ad 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,5 +26,7 @@ // libstdc++/50118 template class std::unordered_set, std::equal_to, __gnu_test::ExplicitConsAlloc>; +#ifndef __STRICT_ANSI__ template class std::unordered_set, std::equal_to, __gnu_test::ExplicitConsAlloc>; +#endif