Fix tests that use allocators with incorrect value types
commit87a79d4a819ae5d2be3200ba4f15d5c60278ebc4
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Oct 2018 21:49:40 +0000 (19 21:49 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Oct 2018 21:49:40 +0000 (19 21:49 +0000)
treee171bc42b50cc79ba4a12b4ddde4dabf06def08c
parente68b943813687697ac71210cbdd7cd052604397f
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265331 138bc75d-0d04-0410-961f-82ee72b054a4
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