Fix tests that use allocators with incorrect value types
authorJonathan Wakely <jwakely@redhat.com>
Fri, 19 Oct 2018 21:49:40 +0000 (22:49 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 19 Oct 2018 21:49:40 +0000 (22:49 +0100)
commit78ed0f80c38b9084794ae4a02e5a5648cbd255ae
treee171bc42b50cc79ba4a12b4ddde4dabf06def08c
parente7f2d0bdb556df6ffe51f92ea14cde3229382531
Fix tests that use allocators with incorrect value types

As a GNU extension we allow containers to be instantiated with
allocators that use a different value type from the container, and
automatically rebind the allocator to the correct type. This extension
is disabled in strict modes (when __STRICT_ANSI__ is defined, i.e.
-std=c++NN dialects). These testcases unintentionally rely on the
extension and so fail for strict modes.

Tests which intentionally make use of the extension will still fail in
strict dialects, but will be addressed in a later change.

* 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.
* testsuite/23_containers/map/56613.cc: Likewise.
* testsuite/23_containers/unordered_map/55043.cc: Likewise.
* testsuite/23_containers/unordered_map/allocator/copy.cc: Likewise.
* testsuite/23_containers/unordered_map/allocator/copy_assign.cc:
Likewise.
* testsuite/23_containers/unordered_map/allocator/minimal.cc:
Likewise.
* testsuite/23_containers/unordered_map/allocator/move.cc: Likewise.
* testsuite/23_containers/unordered_map/allocator/move_assign.cc:
Likewise.
* testsuite/23_containers/unordered_map/allocator/noexcept.cc:
Likewise.
* testsuite/23_containers/unordered_map/cons/81891.cc: Likewise.
* testsuite/23_containers/unordered_map/requirements/exception/
basic.cc: Likewise.
* testsuite/23_containers/unordered_map/requirements/exception/
generation_prohibited.cc: Likewise.
* testsuite/23_containers/unordered_map/requirements/exception/
propagation_consistent.cc: Likewise.
* testsuite/23_containers/unordered_multimap/55043.cc: Likewise.
* testsuite/23_containers/unordered_multimap/allocator/copy.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/allocator/copy_assign.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/allocator/minimal.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/allocator/move.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/allocator/move_assign.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/allocator/noexcept.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/requirements/exception/
basic.cc: Likewise.
* testsuite/23_containers/unordered_multimap/requirements/exception/
generation_prohibited.cc: Likewise.
* testsuite/23_containers/unordered_multimap/requirements/exception/
propagation_consistent.cc: Likewise.
* testsuite/23_containers/unordered_multimap/requirements/
explicit_instantiation/5.cc: Likewise.
* testsuite/ext/malloc_allocator/sanity.cc: Likewise.

From-SVN: r265331
27 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/scoped_allocator/1.cc
libstdc++-v3/testsuite/23_containers/forward_list/cons/14.cc
libstdc++-v3/testsuite/23_containers/map/56613.cc
libstdc++-v3/testsuite/23_containers/unordered_map/55043.cc
libstdc++-v3/testsuite/23_containers/unordered_map/allocator/copy.cc
libstdc++-v3/testsuite/23_containers/unordered_map/allocator/copy_assign.cc
libstdc++-v3/testsuite/23_containers/unordered_map/allocator/minimal.cc
libstdc++-v3/testsuite/23_containers/unordered_map/allocator/move.cc
libstdc++-v3/testsuite/23_containers/unordered_map/allocator/move_assign.cc
libstdc++-v3/testsuite/23_containers/unordered_map/allocator/noexcept.cc
libstdc++-v3/testsuite/23_containers/unordered_map/cons/81891.cc
libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/basic.cc
libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/generation_prohibited.cc
libstdc++-v3/testsuite/23_containers/unordered_map/requirements/exception/propagation_consistent.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/55043.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/allocator/copy.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/allocator/copy_assign.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/allocator/minimal.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/allocator/move.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/allocator/noexcept.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/basic.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/generation_prohibited.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/exception/propagation_consistent.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/ext/malloc_allocator/sanity.cc