2010-08-29 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 29 Aug 2010 17:39:00 +0000 (17:39 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 29 Aug 2010 17:39:00 +0000 (17:39 +0000)
* testsuite/23_containers/bitset/invalidation: Move...
* testsuite/23_containers/bitset/debug/invalidation: ... here.
* testsuite/23_containers/deque/invalidation: Move...
* testsuite/23_containers/deque/debug/invalidation: ... here.
* testsuite/23_containers/list/invalidation: Move...
* testsuite/23_containers/list/debug/invalidation: ... here.
* testsuite/23_containers/map/invalidation: Move...
* testsuite/23_containers/map/debug/invalidation: ... here.
* testsuite/23_containers/multimap/invalidation: Move...
* testsuite/23_containers/multimap/debug/invalidation: ... here.
* testsuite/23_containers/set/invalidation: Move...
* testsuite/23_containers/set/debug/invalidation: ... here.
* testsuite/23_containers/multiset/invalidation: Move...
* testsuite/23_containers/multiset/debug/invalidation: ... here.
* testsuite/23_containers/vector/invalidation: Move...
* testsuite/23_containers/vector/debug/invalidation: ... here.

2010-08-29  François Dumont  <francois.cppdevs@free.fr>

        * include/bits/stl_algobase.h (_Iter_base):  Move...
        * include/bits/stl_iterator_base_types.h: ...here.
        * include/debug/functions.h (__check_valid_range, __check_string,
__check_sorted): Fix to not depend on _GLIBCXX_DEBUG; include
formatter.h and use formatting macros for a consistent debug result.
        * include/debug/formatter.h (__check_singular): Declare; do not
include debug.h.
        * include/debug/debug.h: Do not include formatter.h.
        * include/debug/safe_iterator.h (_Safe_iterator::_Base_Iterator)
        rename to iterator_type.
(__gnu_debug::__base): Add.
        * include/debug/set.h: Use everywhere __gnu_debug::__base once
iterator range valided.
        * include/debug/unordered_map: Likewise.
        * include/debug/multiset.h: Likewise.
        * include/debug/vector: Likewise.
        * include/debug/unordered_set: Likewise.
        * include/debug/deque: Likewise.
        * include/debug/map.h: Likewise.
        * include/debug/string: Likewise.
        * include/debug/list: Likewise.
        * include/debug/multimap.h: Likewise.
        * testsuite/23_containers/util/debug/assign_neg.h: New test cases on
        debug checks performed on container assign operation.
        * testsuite/23_containers/util/debug/construct_neg.h: New test cases
        on debug checks on constructors.
        * testsuite/23_containers/util/debug/insert_neg.h: New test cases on
        debug checks performed on container insert operations.
        * testsuite/23_containers/unordered_map/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: New.
        * testsuite/23_containers/multimap/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/set/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/unordered_multimap/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/unordered_set/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/multiset/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/unordered_multiset/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/map/debug/cont_traits.h,
        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/vector/debug/cont_traits.h,
        debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
        assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/23_containers/deque/debug/cont_traits.h,
        debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
        assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
* testsuite/23_containers/list/debug/cont_traits.h,
        debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
        assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
        insert3_neg.cc, insert4_neg.cc: Likewise.
        * testsuite/performance/23_containers/range_construct/
list_construct1.cc: New, validate performance impact of the patch
on the debug mode.
        * testsuite/performance/23_containers/range_construct/
list_construct2.cc: Likewise.
        * testsuite/performance/23_containers/range_construct/
vector_construct.cc: Likewise.
        * testsuite/performance/23_containers/range_construct/
deque_construct.cc: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163628 138bc75d-0d04-0410-961f-82ee72b054a4

167 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_algobase.h
libstdc++-v3/include/bits/stl_iterator_base_types.h
libstdc++-v3/include/debug/debug.h
libstdc++-v3/include/debug/deque
libstdc++-v3/include/debug/formatter.h
libstdc++-v3/include/debug/functions.h
libstdc++-v3/include/debug/list
libstdc++-v3/include/debug/map.h
libstdc++-v3/include/debug/multimap.h
libstdc++-v3/include/debug/multiset.h
libstdc++-v3/include/debug/safe_iterator.h
libstdc++-v3/include/debug/set.h
libstdc++-v3/include/debug/string
libstdc++-v3/include/debug/unordered_map
libstdc++-v3/include/debug/unordered_set
libstdc++-v3/include/debug/vector
libstdc++-v3/testsuite/23_containers/bitset/debug/invalidation/1.cc [moved from libstdc++-v3/testsuite/23_containers/bitset/invalidation/1.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/deque/debug/assign1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/assign2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/assign3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/assign4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/construct1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/construct2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/construct3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/construct4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/debug_cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/insert1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/insert2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/insert3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/insert4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/invalidation/1.cc [moved from libstdc++-v3/testsuite/23_containers/deque/invalidation/1.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/deque/debug/invalidation/2.cc [moved from libstdc++-v3/testsuite/23_containers/deque/invalidation/2.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/deque/debug/invalidation/3.cc [moved from libstdc++-v3/testsuite/23_containers/deque/invalidation/3.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/deque/debug/invalidation/4.cc [moved from libstdc++-v3/testsuite/23_containers/deque/invalidation/4.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/list/debug/assign1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/assign2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/assign3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/assign4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/construct1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/construct2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/construct3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/construct4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/debug_cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/insert1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/insert2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/insert3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/insert4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/invalidation/1.cc [moved from libstdc++-v3/testsuite/23_containers/list/invalidation/1.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/list/debug/invalidation/2.cc [moved from libstdc++-v3/testsuite/23_containers/list/invalidation/2.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/list/debug/invalidation/3.cc [moved from libstdc++-v3/testsuite/23_containers/list/invalidation/3.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/list/debug/invalidation/4.cc [moved from libstdc++-v3/testsuite/23_containers/list/invalidation/4.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/map/debug/construct1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/debug/construct2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/debug/construct3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/debug/construct4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/debug/cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/debug/debug_cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/debug/insert1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/debug/insert2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/debug/insert3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/debug/insert4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/debug/invalidation/1.cc [moved from libstdc++-v3/testsuite/23_containers/map/invalidation/1.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/map/debug/invalidation/2.cc [moved from libstdc++-v3/testsuite/23_containers/map/invalidation/2.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/multimap/debug/construct1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/debug/construct2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/debug/construct3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/debug/construct4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/debug/cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/debug/debug_cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/debug/insert1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/debug/insert2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/debug/insert3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/debug/insert4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/debug/invalidation/1.cc [moved from libstdc++-v3/testsuite/23_containers/multimap/invalidation/1.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/multimap/debug/invalidation/2.cc [moved from libstdc++-v3/testsuite/23_containers/multimap/invalidation/2.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/multiset/debug/construct1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/debug/construct2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/debug/construct3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/debug/construct4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/debug/cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/debug/debug_cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/debug/insert1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/debug/insert2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/debug/insert3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/debug/insert4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/debug/invalidation/1.cc [moved from libstdc++-v3/testsuite/23_containers/multiset/invalidation/1.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/multiset/debug/invalidation/2.cc [moved from libstdc++-v3/testsuite/23_containers/multiset/invalidation/2.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/set/debug/construct1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/debug/construct2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/debug/construct3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/debug/construct4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/debug/cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/debug/debug_cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/debug/insert1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/debug/insert2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/debug/insert3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/debug/insert4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/debug/invalidation/1.cc [moved from libstdc++-v3/testsuite/23_containers/set/invalidation/1.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/set/debug/invalidation/2.cc [moved from libstdc++-v3/testsuite/23_containers/set/invalidation/2.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/unordered_map/debug/construct1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/debug/construct2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/debug/construct3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/debug/construct4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/debug/cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/debug/debug_cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/debug/insert1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/debug/insert2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/debug/insert3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/debug/insert4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/construct1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/construct2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/construct3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/construct4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/debug_cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/insert1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/insert2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/insert3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/insert4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/construct1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/construct2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/construct3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/construct4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/debug_cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/insert1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/insert2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/insert3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/insert4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/debug/construct1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/debug/construct2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/debug/construct3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/debug/construct4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/debug/cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/debug/debug_cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/debug/insert1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/debug/insert2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/debug/insert3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/debug/insert4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/assign1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/assign2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/assign3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/assign4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/construct1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/construct2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/construct3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/construct4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/debug_cont_traits.h [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/insert1_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/insert2_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/insert3_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/insert4_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/invalidation/1.cc [moved from libstdc++-v3/testsuite/23_containers/vector/invalidation/1.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/vector/debug/invalidation/2.cc [moved from libstdc++-v3/testsuite/23_containers/vector/invalidation/2.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/vector/debug/invalidation/3.cc [moved from libstdc++-v3/testsuite/23_containers/vector/invalidation/3.cc with 100% similarity]
libstdc++-v3/testsuite/23_containers/vector/debug/invalidation/4.cc [moved from libstdc++-v3/testsuite/23_containers/vector/invalidation/4.cc with 100% similarity]
libstdc++-v3/testsuite/performance/23_containers/range_construct/deque_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/performance/23_containers/range_construct/list_construct1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/performance/23_containers/range_construct/list_construct2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/performance/23_containers/range_construct/vector_construct.cc [new file with mode: 0644]
libstdc++-v3/testsuite/util/debug/assign_neg.h [new file with mode: 0644]
libstdc++-v3/testsuite/util/debug/construct_neg.h [new file with mode: 0644]
libstdc++-v3/testsuite/util/debug/insert_neg.h [new file with mode: 0644]

index 9f72d84..af27275 100644 (file)
@@ -1,3 +1,109 @@
+2010-08-29  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * testsuite/23_containers/bitset/invalidation: Move...
+       * testsuite/23_containers/bitset/debug/invalidation: ... here.
+       * testsuite/23_containers/deque/invalidation: Move...
+       * testsuite/23_containers/deque/debug/invalidation: ... here.
+       * testsuite/23_containers/list/invalidation: Move...
+       * testsuite/23_containers/list/debug/invalidation: ... here.
+       * testsuite/23_containers/map/invalidation: Move...
+       * testsuite/23_containers/map/debug/invalidation: ... here.
+       * testsuite/23_containers/multimap/invalidation: Move...
+       * testsuite/23_containers/multimap/debug/invalidation: ... here.
+       * testsuite/23_containers/set/invalidation: Move...
+       * testsuite/23_containers/set/debug/invalidation: ... here.
+       * testsuite/23_containers/multiset/invalidation: Move...
+       * testsuite/23_containers/multiset/debug/invalidation: ... here.
+       * testsuite/23_containers/vector/invalidation: Move...
+       * testsuite/23_containers/vector/debug/invalidation: ... here.
+
+2010-08-29  François Dumont  <francois.cppdevs@free.fr>
+
+        * include/bits/stl_algobase.h (_Iter_base):  Move...
+        * include/bits/stl_iterator_base_types.h: ...here.
+        * include/debug/functions.h (__check_valid_range, __check_string,
+       __check_sorted): Fix to not depend on _GLIBCXX_DEBUG; include
+       formatter.h and use formatting macros for a consistent debug result.
+        * include/debug/formatter.h (__check_singular): Declare; do not
+       include debug.h.
+        * include/debug/debug.h: Do not include formatter.h.
+        * include/debug/safe_iterator.h (_Safe_iterator::_Base_Iterator)
+        rename to iterator_type.
+       (__gnu_debug::__base): Add.
+        * include/debug/set.h: Use everywhere __gnu_debug::__base once
+       iterator range valided.
+        * include/debug/unordered_map: Likewise.
+        * include/debug/multiset.h: Likewise.
+        * include/debug/vector: Likewise.
+        * include/debug/unordered_set: Likewise.
+        * include/debug/deque: Likewise.
+        * include/debug/map.h: Likewise.
+        * include/debug/string: Likewise.
+        * include/debug/list: Likewise.
+        * include/debug/multimap.h: Likewise.
+        * testsuite/23_containers/util/debug/assign_neg.h: New test cases on
+        debug checks performed on container assign operation.
+        * testsuite/23_containers/util/debug/construct_neg.h: New test cases
+        on debug checks on constructors.
+        * testsuite/23_containers/util/debug/insert_neg.h: New test cases on
+        debug checks performed on container insert operations.
+        * testsuite/23_containers/unordered_map/debug/cont_traits.h,
+        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
+        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
+        insert3_neg.cc, insert4_neg.cc: New.
+        * testsuite/23_containers/multimap/debug/cont_traits.h,
+        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
+        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
+        insert3_neg.cc, insert4_neg.cc: Likewise.
+        * testsuite/23_containers/set/debug/cont_traits.h,
+        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
+        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
+        insert3_neg.cc, insert4_neg.cc: Likewise.
+        * testsuite/23_containers/unordered_multimap/debug/cont_traits.h,
+        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
+        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
+        insert3_neg.cc, insert4_neg.cc: Likewise.
+        * testsuite/23_containers/unordered_set/debug/cont_traits.h,
+        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
+        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
+        insert3_neg.cc, insert4_neg.cc: Likewise.
+        * testsuite/23_containers/multiset/debug/cont_traits.h,
+        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
+        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
+        insert3_neg.cc, insert4_neg.cc: Likewise.
+        * testsuite/23_containers/unordered_multiset/debug/cont_traits.h,
+        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
+        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
+        insert3_neg.cc, insert4_neg.cc: Likewise.
+        * testsuite/23_containers/map/debug/cont_traits.h,
+        debug_cont_traits.h, construct1_neg.cc, construct2_neg.cc,
+        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
+        insert3_neg.cc, insert4_neg.cc: Likewise.
+        * testsuite/23_containers/vector/debug/cont_traits.h,
+        debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
+        assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
+        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
+        insert3_neg.cc, insert4_neg.cc: Likewise.
+        * testsuite/23_containers/deque/debug/cont_traits.h,
+        debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
+        assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
+        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
+        insert3_neg.cc, insert4_neg.cc: Likewise.
+       * testsuite/23_containers/list/debug/cont_traits.h,
+        debug_cont_traits.h, assign1_neg.cc, assign2_neg.cc, assign3_neg.cc,
+        assign4_neg.cc, construct1_neg.cc, construct2_neg.cc,
+        construct3_neg.cc, construct4_neg.cc, insert1_neg.cc, insert2_neg.cc,
+        insert3_neg.cc, insert4_neg.cc: Likewise.
+        * testsuite/performance/23_containers/range_construct/
+       list_construct1.cc: New, validate performance impact of the patch
+       on the debug mode.
+        * testsuite/performance/23_containers/range_construct/
+       list_construct2.cc: Likewise.
+        * testsuite/performance/23_containers/range_construct/
+       vector_construct.cc: Likewise.
+        * testsuite/performance/23_containers/range_construct/
+       deque_construct.cc: Likewise.
+
 2010-08-26  Benjamin Kosnik  <bkoz@redhat.com>
 
        * include/bits/stl_iterator_base_types.h: Fix doxygen warning.
index cfaeef8..7160bb5 100644 (file)
@@ -257,27 +257,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       return __a;
     }
 
-
-  // If _Iterator has a base returns it otherwise _Iterator is returned
-  // untouched
-  template<typename _Iterator, bool _HasBase>
-    struct _Iter_base
-    {
-      typedef _Iterator iterator_type;
-      static iterator_type
-      _S_base(_Iterator __it)
-      { return __it; }
-    };
-
-  template<typename _Iterator>
-    struct _Iter_base<_Iterator, true>
-    {
-      typedef typename _Iterator::iterator_type iterator_type;
-      static iterator_type
-      _S_base(_Iterator __it)
-      { return __it.base(); }
-    };
-
   // If _Iterator is a __normal_iterator return its base (a plain pointer,
   // normally) otherwise return it untouched.  See copy, fill, ... 
   template<typename _Iterator>
index 70ad870..1a85259 100644 (file)
@@ -175,6 +175,24 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
 
   //@}
 
+  // If _Iterator has a base returns it otherwise _Iterator is returned
+  // untouched
+  template<typename _Iterator, bool _HasBase>
+    struct _Iter_base
+    {
+      typedef _Iterator iterator_type;
+      static iterator_type _S_base(_Iterator __it)
+      { return __it; }
+    };
+
+  template<typename _Iterator>
+    struct _Iter_base<_Iterator, true>
+    {
+      typedef typename _Iterator::iterator_type iterator_type;
+      static iterator_type _S_base(_Iterator __it)
+      { return __it.base(); }
+    };
+
 _GLIBCXX_END_NAMESPACE
 
 #endif /* _STL_ITERATOR_BASE_TYPES_H */
index 305299b..50bf725 100644 (file)
@@ -123,7 +123,6 @@ namespace __gnu_debug
 # define __glibcxx_requires_subscript(_N) __glibcxx_check_subscript(_N)
 
 # include <debug/functions.h>
-# include <debug/formatter.h>
 
 #endif
 
index 2b54b7d..9c21598 100644 (file)
@@ -89,7 +89,9 @@ namespace __debug
       template<class _InputIterator>
         deque(_InputIterator __first, _InputIterator __last,
              const _Allocator& __a = _Allocator())
-       : _Base(__gnu_debug::__check_valid_range(__first, __last), __last, __a)
+       : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
+                                                                    __last)),
+               __gnu_debug::__base(__last), __a)
         { }
 
       deque(const deque& __x)
@@ -143,7 +145,8 @@ namespace __debug
         assign(_InputIterator __first, _InputIterator __last)
         {
          __glibcxx_check_valid_range(__first, __last);
-         _Base::assign(__first, __last);
+         _Base::assign(__gnu_debug::__base(__first),
+                       __gnu_debug::__base(__last));
          this->_M_invalidate_all();
        }
 
@@ -409,7 +412,8 @@ namespace __debug
               _InputIterator __first, _InputIterator __last)
         {
          __glibcxx_check_insert_range(__position, __first, __last);
-         _Base::insert(__position.base(), __first, __last);
+         _Base::insert(__position.base(), __gnu_debug::__base(__first),
+                                          __gnu_debug::__base(__last));
          this->_M_invalidate_all();
        }
 
index a98ebd8..6945a88 100644 (file)
 
 #include <bits/c++config.h>
 #include <typeinfo>
-#include <debug/debug.h>
 
 namespace __gnu_debug
 {
   using std::type_info;
 
+  template<typename _Iterator>
+    bool __check_singular(_Iterator&);
+
   /** Determine if the two types are the same. */
   template<typename _Type1, typename _Type2>
     struct __is_same
index 237c0e6..75ed9ef 100644 (file)
@@ -33,6 +33,7 @@
 #include <bits/c++config.h>
 #include <bits/stl_iterator_base_types.h> // for iterator_traits, categories
 #include <bits/cpp_type_traits.h>         // for __is_integer
+#include <debug/formatter.h>
 
 namespace __gnu_debug
 {
@@ -153,7 +154,7 @@ namespace __gnu_debug
                        const _InputIterator& __last
                        __attribute__((__unused__)))
     {
-      _GLIBCXX_DEBUG_ASSERT(__valid_range(__first, __last));
+      __glibcxx_check_valid_range(__first, __last);
       return __first;
     }
 
@@ -164,7 +165,7 @@ namespace __gnu_debug
                   const _Integer& __n __attribute__((__unused__)))
     {
 #ifdef _GLIBCXX_DEBUG_PEDANTIC
-      _GLIBCXX_DEBUG_ASSERT(__s != 0 || __n == 0);
+      __glibcxx_assert(__s != 0 || __n == 0);
 #endif
       return __s;
     }
@@ -175,7 +176,7 @@ namespace __gnu_debug
     __check_string(const _CharT* __s)
     {
 #ifdef _GLIBCXX_DEBUG_PEDANTIC
-      _GLIBCXX_DEBUG_ASSERT(__s != 0);
+      __glibcxx_assert(__s != 0);
 #endif
       return __s;
     }
@@ -242,7 +243,7 @@ namespace __gnu_debug
 
       // Verify that the < operator for elements in the sequence is a
       // StrictWeakOrdering by checking that it is irreflexive.
-      _GLIBCXX_DEBUG_ASSERT(__first == __last || !(*__first < *__first));
+      __glibcxx_assert(__first == __last || !(*__first < *__first));
 
       return __check_sorted_aux(__first, __last, _Category());
     }
@@ -257,7 +258,7 @@ namespace __gnu_debug
 
       // Verify that the predicate is StrictWeakOrdering by checking that it
       // is irreflexive.
-      _GLIBCXX_DEBUG_ASSERT(__first == __last || !__pred(*__first, *__first));
+      __glibcxx_assert(__first == __last || !__pred(*__first, *__first));
 
       return __check_sorted_aux(__first, __last, __pred, _Category());
     }
index b6be96f..b656784 100644 (file)
@@ -89,7 +89,9 @@ namespace __debug
       template<class _InputIterator>
       list(_InputIterator __first, _InputIterator __last,
           const _Allocator& __a = _Allocator())
-      : _Base(__gnu_debug::__check_valid_range(__first, __last), __last, __a)
+      : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
+                                                                  __last)),
+              __gnu_debug::__base(__last), __a)
       { }
 
 
@@ -151,7 +153,8 @@ namespace __debug
         assign(_InputIterator __first, _InputIterator __last)
         {
          __glibcxx_check_valid_range(__first, __last);
-         _Base::assign(__first, __last);
+         _Base::assign(__gnu_debug::__base(__first),
+                       __gnu_debug::__base(__last));
          this->_M_invalidate_all();
        }
 
@@ -411,7 +414,8 @@ namespace __debug
               _InputIterator __last)
         {
          __glibcxx_check_insert_range(__position, __first, __last);
-         _Base::insert(__position.base(), __first, __last);
+         _Base::insert(__position.base(), __gnu_debug::__base(__first),
+                                          __gnu_debug::__base(__last));
        }
 
       iterator
index 1254e42..0159bcb 100644 (file)
@@ -81,7 +81,9 @@ namespace __debug
         map(_InputIterator __first, _InputIterator __last,
            const _Compare& __comp = _Compare(),
            const _Allocator& __a = _Allocator())
-       : _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
+       : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
+                                                                    __last)),
+               __gnu_debug::__base(__last),
                __comp, __a), _Safe_base() { }
 
       map(const map& __x)
@@ -226,7 +228,8 @@ namespace __debug
         insert(_InputIterator __first, _InputIterator __last)
         {
          __glibcxx_check_valid_range(__first, __last);
-         _Base::insert(__first, __last);
+         _Base::insert(__gnu_debug::__base(__first),
+                       __gnu_debug::__base(__last));
        }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
index bf06f78..5c45ee6 100644 (file)
@@ -82,7 +82,9 @@ namespace __debug
       multimap(_InputIterator __first, _InputIterator __last,
               const _Compare& __comp = _Compare(),
               const _Allocator& __a = _Allocator())
-      : _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
+       : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
+                                                                    __last)),
+               __gnu_debug::__base(__last),
              __comp, __a) { }
 
       multimap(const multimap& __x)
@@ -213,7 +215,8 @@ namespace __debug
         insert(_InputIterator __first, _InputIterator __last)
         {
          __glibcxx_check_valid_range(__first, __last);
-         _Base::insert(__first, __last);
+         _Base::insert(__gnu_debug::__base(__first),
+                       __gnu_debug::__base(__last));
        }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
index 59cc828..d7d9270 100644 (file)
@@ -79,7 +79,9 @@ namespace __debug
         multiset(_InputIterator __first, _InputIterator __last,
                 const _Compare& __comp = _Compare(),
                 const _Allocator& __a = _Allocator())
-       : _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
+       : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
+                                                                    __last)),
+               __gnu_debug::__base(__last),
                __comp, __a) { }
 
       multiset(const multiset& __x)
@@ -200,12 +202,13 @@ namespace __debug
       }
 
       template<typename _InputIterator>
-      void
-      insert(_InputIterator __first, _InputIterator __last)
-      {
-       __glibcxx_check_valid_range(__first, __last);
-       _Base::insert(__first, __last);
-      }
+       void
+       insert(_InputIterator __first, _InputIterator __last)
+       {
+         __glibcxx_check_valid_range(__first, __last);
+         _Base::insert(__gnu_debug::__base(__first),
+                       __gnu_debug::__base(__last));
+       }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
       void
index eb0a3e4..91b059e 100644 (file)
@@ -1,6 +1,6 @@
 // Safe iterator implementation  -*- C++ -*-
 
-// Copyright (C) 2003, 2004, 2005, 2006, 2009
+// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -33,9 +33,9 @@
 #include <debug/debug.h>
 #include <debug/macros.h>
 #include <debug/functions.h>
-#include <debug/formatter.h>
 #include <debug/safe_base.h>
 #include <bits/stl_pair.h>
+#include <bits/stl_iterator_base_types.h> // for _Iter_base
 #include <ext/type_traits.h>
 
 namespace __gnu_debug
@@ -88,7 +88,7 @@ namespace __gnu_debug
       typedef std::iterator_traits<_Iterator> _Traits;
 
     public:
-      typedef _Iterator                           _Base_iterator;
+      typedef _Iterator                           iterator_type;
       typedef typename _Traits::iterator_category iterator_category;
       typedef typename _Traits::value_type        value_type;
       typedef typename _Traits::difference_type   difference_type;
@@ -136,7 +136,7 @@ namespace __gnu_debug
         _Safe_iterator(
           const _Safe_iterator<_MutableIterator,
           typename __gnu_cxx::__enable_if<(std::__are_same<_MutableIterator,
-                      typename _Sequence::iterator::_Base_iterator>::__value),
+                      typename _Sequence::iterator::iterator_type>::__value),
                    _Sequence>::__type>& __x)
        : _Safe_iterator_base(__x, _M_constant()), _M_current(__x.base())
         {
@@ -638,6 +638,37 @@ namespace __gnu_debug
     operator+(typename _Safe_iterator<_Iterator,_Sequence>::difference_type __n,
              const _Safe_iterator<_Iterator, _Sequence>& __i)
     { return __i + __n; }
+
+  // Helper struct to detect random access safe iterators.
+  template<typename _Iterator>
+    struct __is_safe_random_iterator
+    {
+      enum { __value = 0 };
+      typedef std::__false_type __type;
+    };
+
+  template<typename _Iterator, typename _Sequence>
+    struct __is_safe_random_iterator<_Safe_iterator<_Iterator, _Sequence> >
+    : std::__are_same<std::random_access_iterator_tag,
+                      typename std::iterator_traits<_Iterator>::
+                     iterator_category>
+    { };
+
+  template<typename _Iterator>
+    struct _Siter_base
+    : std::_Iter_base<_Iterator, __is_safe_random_iterator<_Iterator>::__value>
+    { };
+
+  /** Helper function to extract base iterator of random access safe iterator
+      in order to reduce performance impact of debug mode.  Limited to random
+      access iterator because it is the only category for which it is possible
+      to check for correct iterators order in the __valid_range function
+      thanks to the < operator.
+  */
+  template<typename _Iterator>
+    inline typename _Siter_base<_Iterator>::iterator_type
+    __base(_Iterator __it)
+    { return _Siter_base<_Iterator>::_S_base(__it); }
 } // namespace __gnu_debug
 
 #ifndef _GLIBCXX_EXPORT_TEMPLATE
index 24cfcea..5cd3f69 100644 (file)
@@ -79,7 +79,9 @@ namespace __debug
         set(_InputIterator __first, _InputIterator __last,
            const _Compare& __comp = _Compare(),
            const _Allocator& __a = _Allocator())
-       : _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
+       : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
+                                                                    __last)),
+               __gnu_debug::__base(__last),
                __comp, __a) { }
 
       set(const set& __x)
@@ -209,7 +211,8 @@ namespace __debug
         insert(_InputIterator __first, _InputIterator __last)
         {
          __glibcxx_check_valid_range(__first, __last);
-         _Base::insert(__first, __last);
+         _Base::insert(__gnu_debug::__base(__first),
+                       __gnu_debug::__base(__last));
        }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
index e5152eb..4fe0a06 100644 (file)
@@ -107,8 +107,10 @@ namespace __gnu_debug
 
     template<typename _InputIterator>
       basic_string(_InputIterator __begin, _InputIterator __end,
-                    const _Allocator& __a = _Allocator())
-      : _Base(__gnu_debug::__check_valid_range(__begin, __end), __end, __a)
+                  const _Allocator& __a = _Allocator())
+      : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__begin,
+                                                                  __end)),
+             __gnu_debug::__base(__end), __a)
       { }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -350,7 +352,8 @@ namespace __gnu_debug
       append(_InputIterator __first, _InputIterator __last)
       {
        __glibcxx_check_valid_range(__first, __last);
-       _Base::append(__first, __last);
+       _Base::append(__gnu_debug::__base(__first),
+                     __gnu_debug::__base(__last));
        this->_M_invalidate_all();
        return *this;
       }
@@ -421,7 +424,8 @@ namespace __gnu_debug
       assign(_InputIterator __first, _InputIterator __last)
       {
        __glibcxx_check_valid_range(__first, __last);
-       _Base::assign(__first, __last);
+       _Base::assign(__gnu_debug::__base(__first),
+                     __gnu_debug::__base(__last));
        this->_M_invalidate_all();
        return *this;
       }
@@ -501,7 +505,8 @@ namespace __gnu_debug
       insert(iterator __p, _InputIterator __first, _InputIterator __last)
       {
        __glibcxx_check_insert_range(__p, __first, __last);
-       _Base::insert(__p.base(), __first, __last);
+       _Base::insert(__p.base(), __gnu_debug::__base(__first),
+                                 __gnu_debug::__base(__last));
        this->_M_invalidate_all();
       }
 
index 04d311d..2e2f912 100644 (file)
@@ -78,12 +78,14 @@ namespace __debug
       : _Base(__n, __hf, __eql, __a) { }
 
       template<typename _InputIterator>
-        unordered_map(_InputIterator __f, _InputIterator __l
+        unordered_map(_InputIterator __first, _InputIterator __last
                      size_type __n = 0,
                      const hasher& __hf = hasher(), 
                      const key_equal& __eql = key_equal(), 
                      const allocator_type& __a = allocator_type())
-       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
+       : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
+                                                                    __last)),
+               __gnu_debug::__base(__last), __n,
                __hf, __eql, __a), _Safe_base() { }
 
       unordered_map(const unordered_map& __x) 
@@ -197,7 +199,8 @@ namespace __debug
         insert(_InputIterator __first, _InputIterator __last)
         {
          __glibcxx_check_valid_range(__first, __last);
-         _Base::insert(__first, __last);
+         _Base::insert(__gnu_debug::__base(__first),
+                       __gnu_debug::__base(__last));
        }
 
       iterator
@@ -337,12 +340,14 @@ namespace __debug
       : _Base(__n, __hf, __eql, __a) { }
 
       template<typename _InputIterator>
-        unordered_multimap(_InputIterator __f, _InputIterator __l
+        unordered_multimap(_InputIterator __first, _InputIterator __last
                           size_type __n = 0,
                           const hasher& __hf = hasher(), 
                           const key_equal& __eql = key_equal(), 
                           const allocator_type& __a = allocator_type())
-       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
+       : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
+                                                                    __last)),
+               __gnu_debug::__base(__last), __n,
                __hf, __eql, __a), _Safe_base() { }
 
       unordered_multimap(const unordered_multimap& __x) 
@@ -448,7 +453,8 @@ namespace __debug
         insert(_InputIterator __first, _InputIterator __last)
         {
          __glibcxx_check_valid_range(__first, __last);
-         _Base::insert(__first, __last);
+         _Base::insert(__gnu_debug::__base(__first),
+                       __gnu_debug::__base(__last));
        }
 
       iterator
index 13f8698..ea90c67 100644 (file)
@@ -78,12 +78,14 @@ namespace __debug
       : _Base(__n, __hf, __eql, __a) { }
 
       template<typename _InputIterator>
-        unordered_set(_InputIterator __f, _InputIterator __l
+        unordered_set(_InputIterator __first, _InputIterator __last
                      size_type __n = 0,
                      const hasher& __hf = hasher(), 
                      const key_equal& __eql = key_equal(), 
                      const allocator_type& __a = allocator_type())
-       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
+       : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
+                                                                    __last)),
+               __gnu_debug::__base(__last), __n,
                __hf, __eql, __a), _Safe_base() { }
 
       unordered_set(const unordered_set& __x) 
@@ -197,7 +199,8 @@ namespace __debug
         insert(_InputIterator __first, _InputIterator __last)
         {
          __glibcxx_check_valid_range(__first, __last);
-         _Base::insert(__first, __last);
+         _Base::insert(__gnu_debug::__base(__first),
+                       __gnu_debug::__base(__last));
        }
 
       iterator
@@ -333,12 +336,14 @@ namespace __debug
       : _Base(__n, __hf, __eql, __a) { }
 
       template<typename _InputIterator>
-        unordered_multiset(_InputIterator __f, _InputIterator __l
+        unordered_multiset(_InputIterator __first, _InputIterator __last
                           size_type __n = 0,
                           const hasher& __hf = hasher(), 
                           const key_equal& __eql = key_equal(), 
                           const allocator_type& __a = allocator_type())
-       : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
+       : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
+                                                                    __last)),
+               __gnu_debug::__base(__last), __n,
                __hf, __eql, __a), _Safe_base() { }
 
       unordered_multiset(const unordered_multiset& __x) 
@@ -444,7 +449,8 @@ namespace __debug
         insert(_InputIterator __first, _InputIterator __last)
         {
          __glibcxx_check_valid_range(__first, __last);
-         _Base::insert(__first, __last);
+         _Base::insert(__gnu_debug::__base(__first),
+                       __gnu_debug::__base(__last));
        }
 
       iterator
index 3d03965..b0846b8 100644 (file)
@@ -94,8 +94,9 @@ namespace __debug
       template<class _InputIterator>
         vector(_InputIterator __first, _InputIterator __last,
               const _Allocator& __a = _Allocator())
-       : _Base(__gnu_debug::__check_valid_range(__first, __last),
-               __last, __a),
+        : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
+                                                                    __last)),
+               __gnu_debug::__base(__last), __a),
          _M_guaranteed_capacity(0)
         { _M_update_guaranteed_capacity(); }
 
@@ -158,7 +159,8 @@ namespace __debug
         assign(_InputIterator __first, _InputIterator __last)
         {
          __glibcxx_check_valid_range(__first, __last);
-         _Base::assign(__first, __last);
+         _Base::assign(__gnu_debug::__base(__first),
+                       __gnu_debug::__base(__last));
          this->_M_invalidate_all();
          _M_update_guaranteed_capacity();
        }
@@ -463,7 +465,8 @@ namespace __debug
             punt here by checking if it did occur. */
          typename _Base::iterator __old_begin = _M_base().begin();
          difference_type __offset = __position - begin();
-         _Base::insert(__position.base(), __first, __last);
+         _Base::insert(__position.base(), __gnu_debug::__base(__first),
+                                          __gnu_debug::__base(__last));
 
          if (_M_base().begin() != __old_begin)
            this->_M_invalidate_all();
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/assign1_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/assign1_neg.cc
new file mode 100644 (file)
index 0000000..b28e987
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/assign_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/assign2_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/assign2_neg.cc
new file mode 100644 (file)
index 0000000..cfff8ac
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/assign_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/assign3_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/assign3_neg.cc
new file mode 100644 (file)
index 0000000..cfd0bb0
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/assign_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/assign4_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/assign4_neg.cc
new file mode 100644 (file)
index 0000000..115580d
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/assign_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/construct1_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/construct1_neg.cc
new file mode 100644 (file)
index 0000000..791c1a2
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/construct2_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/construct2_neg.cc
new file mode 100644 (file)
index 0000000..6cac9f0
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/construct3_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/construct3_neg.cc
new file mode 100644 (file)
index 0000000..752c95c
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/construct4_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/construct4_neg.cc
new file mode 100644 (file)
index 0000000..9ee467e
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/cont_traits.h b/libstdc++-v3/testsuite/23_containers/deque/debug/cont_traits.h
new file mode 100644 (file)
index 0000000..13ab4f9
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <deque>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef std::deque<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(cont.begin(), first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/debug_cont_traits.h b/libstdc++-v3/testsuite/23_containers/deque/debug/debug_cont_traits.h
new file mode 100644 (file)
index 0000000..b4dda92
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <debug/deque>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef __gnu_debug::deque<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(cont.begin(), first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/insert1_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/insert1_neg.cc
new file mode 100644 (file)
index 0000000..d04b441
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/insert2_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/insert2_neg.cc
new file mode 100644 (file)
index 0000000..106c64a
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/insert3_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/insert3_neg.cc
new file mode 100644 (file)
index 0000000..9d3d7b1
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/insert4_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/insert4_neg.cc
new file mode 100644 (file)
index 0000000..fc49ae6
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/assign1_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/assign1_neg.cc
new file mode 100644 (file)
index 0000000..b28e987
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/assign_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/assign2_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/assign2_neg.cc
new file mode 100644 (file)
index 0000000..cfff8ac
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/assign_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/assign3_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/assign3_neg.cc
new file mode 100644 (file)
index 0000000..cfd0bb0
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/assign_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/assign4_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/assign4_neg.cc
new file mode 100644 (file)
index 0000000..115580d
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/assign_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/construct1_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/construct1_neg.cc
new file mode 100644 (file)
index 0000000..791c1a2
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/construct2_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/construct2_neg.cc
new file mode 100644 (file)
index 0000000..6cac9f0
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/construct3_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/construct3_neg.cc
new file mode 100644 (file)
index 0000000..752c95c
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/construct4_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/construct4_neg.cc
new file mode 100644 (file)
index 0000000..9ee467e
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/cont_traits.h b/libstdc++-v3/testsuite/23_containers/list/debug/cont_traits.h
new file mode 100644 (file)
index 0000000..662a97e
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <list>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef std::list<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(cont.begin(), first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/debug_cont_traits.h b/libstdc++-v3/testsuite/23_containers/list/debug/debug_cont_traits.h
new file mode 100644 (file)
index 0000000..4993735
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <debug/list>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef __gnu_debug::list<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(cont.begin(), first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/insert1_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/insert1_neg.cc
new file mode 100644 (file)
index 0000000..d04b441
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/insert2_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/insert2_neg.cc
new file mode 100644 (file)
index 0000000..106c64a
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/insert3_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/insert3_neg.cc
new file mode 100644 (file)
index 0000000..9d3d7b1
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/insert4_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/insert4_neg.cc
new file mode 100644 (file)
index 0000000..fc49ae6
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/debug/construct1_neg.cc b/libstdc++-v3/testsuite/23_containers/map/debug/construct1_neg.cc
new file mode 100644 (file)
index 0000000..791c1a2
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/debug/construct2_neg.cc b/libstdc++-v3/testsuite/23_containers/map/debug/construct2_neg.cc
new file mode 100644 (file)
index 0000000..6cac9f0
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/debug/construct3_neg.cc b/libstdc++-v3/testsuite/23_containers/map/debug/construct3_neg.cc
new file mode 100644 (file)
index 0000000..752c95c
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/debug/construct4_neg.cc b/libstdc++-v3/testsuite/23_containers/map/debug/construct4_neg.cc
new file mode 100644 (file)
index 0000000..9ee467e
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/debug/cont_traits.h b/libstdc++-v3/testsuite/23_containers/map/debug/cont_traits.h
new file mode 100644 (file)
index 0000000..739ee7a
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <map>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef std::map<Type, Type> cont_type;
+    typedef std::pair<Type, Type> val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val_type(val, val); }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/map/debug/debug_cont_traits.h b/libstdc++-v3/testsuite/23_containers/map/debug/debug_cont_traits.h
new file mode 100644 (file)
index 0000000..34acf37
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <debug/map>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef __gnu_debug::map<Type, Type> cont_type;
+    typedef std::pair<Type, Type> val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val_type(val, val); }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/map/debug/insert1_neg.cc b/libstdc++-v3/testsuite/23_containers/map/debug/insert1_neg.cc
new file mode 100644 (file)
index 0000000..d04b441
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/debug/insert2_neg.cc b/libstdc++-v3/testsuite/23_containers/map/debug/insert2_neg.cc
new file mode 100644 (file)
index 0000000..106c64a
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/debug/insert3_neg.cc b/libstdc++-v3/testsuite/23_containers/map/debug/insert3_neg.cc
new file mode 100644 (file)
index 0000000..9d3d7b1
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/debug/insert4_neg.cc b/libstdc++-v3/testsuite/23_containers/map/debug/insert4_neg.cc
new file mode 100644 (file)
index 0000000..fc49ae6
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/debug/construct1_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/debug/construct1_neg.cc
new file mode 100644 (file)
index 0000000..791c1a2
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/debug/construct2_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/debug/construct2_neg.cc
new file mode 100644 (file)
index 0000000..6cac9f0
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/debug/construct3_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/debug/construct3_neg.cc
new file mode 100644 (file)
index 0000000..752c95c
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/debug/construct4_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/debug/construct4_neg.cc
new file mode 100644 (file)
index 0000000..9ee467e
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/debug/cont_traits.h b/libstdc++-v3/testsuite/23_containers/multimap/debug/cont_traits.h
new file mode 100644 (file)
index 0000000..495e3e4
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <map>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef std::multimap<Type, Type> cont_type;
+    typedef std::pair<Type, Type> val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val_type(val, val); }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/debug/debug_cont_traits.h b/libstdc++-v3/testsuite/23_containers/multimap/debug/debug_cont_traits.h
new file mode 100644 (file)
index 0000000..98bd1f2
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <debug/map>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef __gnu_debug::multimap<Type, Type> cont_type;
+    typedef std::pair<Type, Type> val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val_type(val, val); }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/debug/insert1_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/debug/insert1_neg.cc
new file mode 100644 (file)
index 0000000..d04b441
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/debug/insert2_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/debug/insert2_neg.cc
new file mode 100644 (file)
index 0000000..106c64a
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/debug/insert3_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/debug/insert3_neg.cc
new file mode 100644 (file)
index 0000000..9d3d7b1
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/debug/insert4_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/debug/insert4_neg.cc
new file mode 100644 (file)
index 0000000..fc49ae6
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/debug/construct1_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/debug/construct1_neg.cc
new file mode 100644 (file)
index 0000000..791c1a2
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/debug/construct2_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/debug/construct2_neg.cc
new file mode 100644 (file)
index 0000000..6cac9f0
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/debug/construct3_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/debug/construct3_neg.cc
new file mode 100644 (file)
index 0000000..752c95c
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/debug/construct4_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/debug/construct4_neg.cc
new file mode 100644 (file)
index 0000000..9ee467e
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/debug/cont_traits.h b/libstdc++-v3/testsuite/23_containers/multiset/debug/cont_traits.h
new file mode 100644 (file)
index 0000000..4e06da2
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <set>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef std::multiset<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/debug/debug_cont_traits.h b/libstdc++-v3/testsuite/23_containers/multiset/debug/debug_cont_traits.h
new file mode 100644 (file)
index 0000000..d5bafe4
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <debug/set>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef __gnu_debug::multiset<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/debug/insert1_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/debug/insert1_neg.cc
new file mode 100644 (file)
index 0000000..d04b441
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/debug/insert2_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/debug/insert2_neg.cc
new file mode 100644 (file)
index 0000000..106c64a
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/debug/insert3_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/debug/insert3_neg.cc
new file mode 100644 (file)
index 0000000..9d3d7b1
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/debug/insert4_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/debug/insert4_neg.cc
new file mode 100644 (file)
index 0000000..fc49ae6
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/construct1_neg.cc b/libstdc++-v3/testsuite/23_containers/set/debug/construct1_neg.cc
new file mode 100644 (file)
index 0000000..791c1a2
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/construct2_neg.cc b/libstdc++-v3/testsuite/23_containers/set/debug/construct2_neg.cc
new file mode 100644 (file)
index 0000000..6cac9f0
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/construct3_neg.cc b/libstdc++-v3/testsuite/23_containers/set/debug/construct3_neg.cc
new file mode 100644 (file)
index 0000000..752c95c
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/construct4_neg.cc b/libstdc++-v3/testsuite/23_containers/set/debug/construct4_neg.cc
new file mode 100644 (file)
index 0000000..9ee467e
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/cont_traits.h b/libstdc++-v3/testsuite/23_containers/set/debug/cont_traits.h
new file mode 100644 (file)
index 0000000..fbcc0ff
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <set>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef std::set<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/debug_cont_traits.h b/libstdc++-v3/testsuite/23_containers/set/debug/debug_cont_traits.h
new file mode 100644 (file)
index 0000000..5f69376
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <debug/set>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef __gnu_debug::set<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/insert1_neg.cc b/libstdc++-v3/testsuite/23_containers/set/debug/insert1_neg.cc
new file mode 100644 (file)
index 0000000..d04b441
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/insert2_neg.cc b/libstdc++-v3/testsuite/23_containers/set/debug/insert2_neg.cc
new file mode 100644 (file)
index 0000000..106c64a
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/insert3_neg.cc b/libstdc++-v3/testsuite/23_containers/set/debug/insert3_neg.cc
new file mode 100644 (file)
index 0000000..9d3d7b1
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/insert4_neg.cc b/libstdc++-v3/testsuite/23_containers/set/debug/insert4_neg.cc
new file mode 100644 (file)
index 0000000..fc49ae6
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/construct1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/construct1_neg.cc
new file mode 100644 (file)
index 0000000..a939d9e
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/construct2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/construct2_neg.cc
new file mode 100644 (file)
index 0000000..697db52
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/construct3_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/construct3_neg.cc
new file mode 100644 (file)
index 0000000..899f295
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/construct4_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/construct4_neg.cc
new file mode 100644 (file)
index 0000000..e2d0efd
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/cont_traits.h b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/cont_traits.h
new file mode 100644 (file)
index 0000000..262b358
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <unordered_map>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef std::unordered_map<Type, Type> cont_type;
+    typedef std::pair<Type, Type> val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val_type(val, val); }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/debug_cont_traits.h b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/debug_cont_traits.h
new file mode 100644 (file)
index 0000000..7b3b8c3
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <debug/unordered_map>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef __gnu_debug::unordered_map<Type, Type> cont_type;
+    typedef std::pair<Type, Type> val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val_type(val, val); }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/insert1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/insert1_neg.cc
new file mode 100644 (file)
index 0000000..e9bb1cf
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/insert2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/insert2_neg.cc
new file mode 100644 (file)
index 0000000..c42b8b5
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/insert3_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/insert3_neg.cc
new file mode 100644 (file)
index 0000000..e8d9e9b
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/insert4_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/insert4_neg.cc
new file mode 100644 (file)
index 0000000..9f3d567
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/construct1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/construct1_neg.cc
new file mode 100644 (file)
index 0000000..a939d9e
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/construct2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/construct2_neg.cc
new file mode 100644 (file)
index 0000000..697db52
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/construct3_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/construct3_neg.cc
new file mode 100644 (file)
index 0000000..899f295
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/construct4_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/construct4_neg.cc
new file mode 100644 (file)
index 0000000..e2d0efd
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/cont_traits.h b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/cont_traits.h
new file mode 100644 (file)
index 0000000..1212274
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <unordered_map>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef std::unordered_multimap<Type, Type> cont_type;
+    typedef std::pair<Type, Type> val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val_type(val, val); }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/debug_cont_traits.h b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/debug_cont_traits.h
new file mode 100644 (file)
index 0000000..d66594d
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <debug/unordered_map>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef __gnu_debug::unordered_multimap<Type, Type> cont_type;
+    typedef std::pair<Type, Type> val_type;
+
+    static val_type
+    make_val(Type val)
+    { return std::pair<Type, Type>(val, val); }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/insert1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/insert1_neg.cc
new file mode 100644 (file)
index 0000000..e9bb1cf
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/insert2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/insert2_neg.cc
new file mode 100644 (file)
index 0000000..c42b8b5
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/insert3_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/insert3_neg.cc
new file mode 100644 (file)
index 0000000..e8d9e9b
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/insert4_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/insert4_neg.cc
new file mode 100644 (file)
index 0000000..9f3d567
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/construct1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/construct1_neg.cc
new file mode 100644 (file)
index 0000000..a939d9e
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/construct2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/construct2_neg.cc
new file mode 100644 (file)
index 0000000..697db52
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/construct3_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/construct3_neg.cc
new file mode 100644 (file)
index 0000000..899f295
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/construct4_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/construct4_neg.cc
new file mode 100644 (file)
index 0000000..e2d0efd
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/cont_traits.h b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/cont_traits.h
new file mode 100644 (file)
index 0000000..b82d737
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <unordered_set>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef std::unordered_multiset<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/debug_cont_traits.h b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/debug_cont_traits.h
new file mode 100644 (file)
index 0000000..7053683
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <debug/unordered_set>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef __gnu_debug::unordered_multiset<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/insert1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/insert1_neg.cc
new file mode 100644 (file)
index 0000000..e9bb1cf
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/insert2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/insert2_neg.cc
new file mode 100644 (file)
index 0000000..c42b8b5
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/insert3_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/insert3_neg.cc
new file mode 100644 (file)
index 0000000..e8d9e9b
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/insert4_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/insert4_neg.cc
new file mode 100644 (file)
index 0000000..9f3d567
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/construct1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/construct1_neg.cc
new file mode 100644 (file)
index 0000000..a939d9e
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/construct2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/construct2_neg.cc
new file mode 100644 (file)
index 0000000..697db52
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/construct3_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/construct3_neg.cc
new file mode 100644 (file)
index 0000000..899f295
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/construct4_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/construct4_neg.cc
new file mode 100644 (file)
index 0000000..e2d0efd
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/cont_traits.h b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/cont_traits.h
new file mode 100644 (file)
index 0000000..7709f49
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <unordered_set>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef std::unordered_set<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/debug_cont_traits.h b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/debug_cont_traits.h
new file mode 100644 (file)
index 0000000..f4d6e9b
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <debug/unordered_set>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef __gnu_debug::unordered_set<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/insert1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/insert1_neg.cc
new file mode 100644 (file)
index 0000000..e9bb1cf
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/insert2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/insert2_neg.cc
new file mode 100644 (file)
index 0000000..c42b8b5
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/insert3_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/insert3_neg.cc
new file mode 100644 (file)
index 0000000..e8d9e9b
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/insert4_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/insert4_neg.cc
new file mode 100644 (file)
index 0000000..9f3d567
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/assign1_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/assign1_neg.cc
new file mode 100644 (file)
index 0000000..b28e987
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/assign_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/assign2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/assign2_neg.cc
new file mode 100644 (file)
index 0000000..cfff8ac
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/assign_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/assign3_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/assign3_neg.cc
new file mode 100644 (file)
index 0000000..cfd0bb0
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/assign_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/assign4_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/assign4_neg.cc
new file mode 100644 (file)
index 0000000..115580d
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/assign_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/construct1_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/construct1_neg.cc
new file mode 100644 (file)
index 0000000..791c1a2
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/construct2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/construct2_neg.cc
new file mode 100644 (file)
index 0000000..6cac9f0
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/construct3_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/construct3_neg.cc
new file mode 100644 (file)
index 0000000..752c95c
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/construct4_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/construct4_neg.cc
new file mode 100644 (file)
index 0000000..9ee467e
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/construct_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/cont_traits.h b/libstdc++-v3/testsuite/23_containers/vector/debug/cont_traits.h
new file mode 100644 (file)
index 0000000..cdd9a08
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef std::vector<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(cont.begin(), first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/debug_cont_traits.h b/libstdc++-v3/testsuite/23_containers/vector/debug/debug_cont_traits.h
new file mode 100644 (file)
index 0000000..204caff
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2010 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 <debug/vector>
+
+template<typename Type>
+  struct cont_traits
+  {
+    typedef __gnu_debug::vector<Type> cont_type;
+    typedef Type val_type;
+
+    static val_type
+    make_val(Type val)
+    { return val; }
+
+    template<typename Iter>
+      static void
+      insert(cont_type& cont, Iter first, Iter last)
+      { cont.insert(cont.begin(), first, last); }
+  };
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/insert1_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/insert1_neg.cc
new file mode 100644 (file)
index 0000000..d04b441
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/insert2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/insert2_neg.cc
new file mode 100644 (file)
index 0000000..106c64a
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check2<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/insert3_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/insert3_neg.cc
new file mode 100644 (file)
index 0000000..9d3d7b1
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "cont_traits.h"
+
+void test01()
+{
+  check3<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/insert4_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/insert4_neg.cc
new file mode 100644 (file)
index 0000000..fc49ae6
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2010 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/>.
+//
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/insert_neg.h>
+#include "debug_cont_traits.h"
+
+void test01()
+{
+  debug_check1<cont_traits>();
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/performance/23_containers/range_construct/deque_construct.cc b/libstdc++-v3/testsuite/performance/23_containers/range_construct/deque_construct.cc
new file mode 100644 (file)
index 0000000..c8a804e
--- /dev/null
@@ -0,0 +1,43 @@
+// Copyright (C) 2010 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/>.
+//
+
+// Performance test of debug mode deque range constructor 
+#define _GLIBCXX_DEBUG
+
+#include <deque>
+#include <testsuite_performance.h>
+
+int main()
+{
+  using namespace __gnu_test;
+
+  time_counter time;
+  resource_counter resource;
+
+  const std::deque<int> ref(50000, 3);
+
+  start_counters(time, resource);
+
+  for (unsigned i = 0; i < 1000; ++i)
+    std::deque<int> v(ref.begin(), ref.end());
+
+  stop_counters(time, resource);
+  report_performance(__FILE__, "", time, resource);
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/performance/23_containers/range_construct/list_construct1.cc b/libstdc++-v3/testsuite/performance/23_containers/range_construct/list_construct1.cc
new file mode 100644 (file)
index 0000000..19224ad
--- /dev/null
@@ -0,0 +1,44 @@
+// Copyright (C) 2010 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/>.
+//
+
+// Performance test of debug mode list range constructor
+#define _GLIBCXX_DEBUG
+
+#include <vector>
+#include <list>
+#include <testsuite_performance.h>
+
+int main()
+{
+  using namespace __gnu_test;
+
+  time_counter time;
+  resource_counter resource;
+
+  const std::vector<int> ref(50000, 3);
+
+  start_counters(time, resource);
+
+  for (unsigned i = 0; i < 1000; ++i)
+    std::list<int> l(ref.begin(), ref.end());
+
+  stop_counters(time, resource);
+  report_performance(__FILE__, "", time, resource);
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/performance/23_containers/range_construct/list_construct2.cc b/libstdc++-v3/testsuite/performance/23_containers/range_construct/list_construct2.cc
new file mode 100644 (file)
index 0000000..51bc7a1
--- /dev/null
@@ -0,0 +1,43 @@
+// Copyright (C) 2010 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/>.
+//
+
+// Performance test of debug mode list range constructor
+#define _GLIBCXX_DEBUG
+
+#include <list>
+#include <testsuite_performance.h>
+
+int main()
+{
+  using namespace __gnu_test;
+
+  time_counter time;
+  resource_counter resource;
+
+  const std::list<int> ref(50000, 3);
+
+  start_counters(time, resource);
+
+  for (unsigned i = 0; i < 1000; ++i)
+    std::list<int> l(ref.begin(), ref.end());
+
+  stop_counters(time, resource);
+  report_performance(__FILE__, "", time, resource);
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/performance/23_containers/range_construct/vector_construct.cc b/libstdc++-v3/testsuite/performance/23_containers/range_construct/vector_construct.cc
new file mode 100644 (file)
index 0000000..08716a5
--- /dev/null
@@ -0,0 +1,43 @@
+// Copyright (C) 2010 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/>.
+//
+
+// Performance test of debug mode vector range constructor
+#define _GLIBCXX_DEBUG
+
+#include <vector>
+#include <testsuite_performance.h>
+
+int main()
+{
+  using namespace __gnu_test;
+
+  time_counter time;
+  resource_counter resource;
+
+  const std::vector<int> ref(50000, 3);
+
+  start_counters(time, resource);
+
+  for (unsigned i = 0; i < 1000; ++i)
+    std::vector<int> v(ref.begin(), ref.end());
+
+  stop_counters(time, resource);
+  report_performance(__FILE__, "", time, resource);
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/util/debug/assign_neg.h b/libstdc++-v3/testsuite/util/debug/assign_neg.h
new file mode 100644 (file)
index 0000000..332c716
--- /dev/null
@@ -0,0 +1,136 @@
+// Copyright (C) 2010 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 <list>
+#include <testsuite_hooks.h>
+
+// Check that invalid range of pointers is detected
+template<template <typename> class ContTraits>
+  void
+  debug_check1()
+  {
+    bool test __attribute__((unused)) = true;
+
+    typedef ContTraits<int> Traits;
+    typedef typename Traits::cont_type cont_type;
+    typedef typename Traits::val_type val_type;
+    typedef std::vector<val_type> vector_type;
+
+    vector_type v;
+    for (int i = 0; i != 5; ++i)
+      v.push_back(Traits::make_val(i));
+    VERIFY(v.size() == 5);
+
+    const val_type* first = &v.front() + 1;
+    const val_type* last = first + 2;
+
+    cont_type c1;
+    c1.assign(first, last);
+    VERIFY(c1.size() == 2);
+
+    cont_type c2;
+    c2.assign(last, first); // Expected failure
+  }
+
+template <template <typename> class ContTraits>
+  void
+  check1()
+  {
+#ifdef _GLIBCXX_DEBUG
+    debug_check1<ContTraits>();
+#else
+    __builtin_abort();
+#endif
+  }
+
+// Check that invalid range of debug random iterators is detected
+template<template <typename> class ContTraits>
+  void
+  debug_check2()
+  {
+    bool test __attribute__((unused)) = true;
+
+    typedef ContTraits<int> Traits;
+    typedef typename Traits::cont_type cont_type;
+    typedef typename Traits::val_type val_type;
+    typedef std::vector<val_type> vector_type;
+
+    vector_type v;
+    for (int i = 0; i != 5; ++i)
+      v.push_back(Traits::make_val(i));
+    VERIFY(v.size() == 5);
+
+    typename vector_type::iterator first = v.begin() + 1;
+    typename vector_type::iterator last = first + 2;
+    cont_type c1;
+    c1.assign(first, last);
+    VERIFY(c1.size() == 2);
+
+    cont_type c2;
+    c2.assign(last, first); // Expected failure
+  }
+
+template<template <typename> class ContTraits>
+  void
+  check2()
+  {
+#ifdef _GLIBCXX_DEBUG
+    debug_check2<ContTraits>();
+#else
+    __builtin_abort();
+#endif
+  }
+
+// Check that invalid range of debug !random debug iterators is detected
+template<template <typename> class ContTraits>
+  void
+  debug_check3()
+  {
+    bool test __attribute__((unused)) = true;
+
+    typedef ContTraits<int> Traits;
+    typedef typename Traits::cont_type cont_type;
+    typedef typename Traits::val_type val_type;
+    typedef std::list<val_type> list_type;
+
+    list_type l;
+    for (int i = 0; i != 5; ++i)
+      l.push_back(Traits::make_val(i));
+    VERIFY(l.size() == 5);
+
+    typename list_type::iterator first = l.begin(); ++first;
+    typename list_type::iterator last = first; ++last; ++last;
+    cont_type c1;
+    c1.assign(first, last);
+    VERIFY(c1.size() == 2);
+
+    cont_type c2;
+    c2.assign(last, first); // Expected failure
+  }
+
+template<template <typename> class ContTraits>
+  void
+  check3()
+  {
+#ifdef _GLIBCXX_DEBUG
+    debug_check3<ContTraits>();
+#else
+    __builtin_abort();
+#endif
+  }
diff --git a/libstdc++-v3/testsuite/util/debug/construct_neg.h b/libstdc++-v3/testsuite/util/debug/construct_neg.h
new file mode 100644 (file)
index 0000000..78736d3
--- /dev/null
@@ -0,0 +1,128 @@
+// Copyright (C) 2010 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 <list>
+#include <testsuite_hooks.h>
+
+// Check that invalid range of pointers is detected
+template<template<typename> class ContTraits>
+  void
+  debug_check1()
+  {
+    bool test __attribute__((unused)) = true;
+
+    typedef ContTraits<int> Traits;
+    typedef typename Traits::cont_type cont_type;
+    typedef typename Traits::val_type val_type;
+    typedef std::vector<val_type> vector_type;
+
+    vector_type v;
+    for (int i = 0; i != 5; ++i)
+      v.push_back(Traits::make_val(i));
+    VERIFY(v.size() == 5);
+
+    val_type *first = &v.front() + 1;
+    val_type *last = first + 2;
+    cont_type c1(first, last);
+    VERIFY(c1.size() == 2);
+
+    cont_type c2(last, first); // Expected failure
+  }
+
+template<template<typename> class ContTraits>
+  void
+  check1()
+  {
+#ifdef _GLIBCXX_DEBUG
+    debug_check1<ContTraits>();
+#else
+    __builtin_abort();
+#endif
+  }
+
+// Check that invalid range of debug random iterators is detected
+template<template<typename> class ContTraits>
+  void
+  debug_check2()
+  {
+    bool test __attribute__((unused)) = true;
+
+    typedef ContTraits<int> Traits;
+    typedef typename Traits::cont_type cont_type;
+    typedef typename Traits::val_type val_type;
+    typedef std::vector<val_type> vector_type;
+
+    vector_type v;
+    for (int i = 0; i != 5; ++i)
+      v.push_back(Traits::make_val(i));
+    VERIFY(v.size() == 5);
+
+    typename vector_type::iterator first = v.begin() + 1;
+    typename vector_type::iterator last = first + 2;
+    cont_type c1(first, last);
+    VERIFY(c1.size() == 2);
+
+    cont_type c2(last, first); // Expected failure
+  }
+
+template<template<typename> class ContTraits>
+  void
+  check2()
+  {
+#ifdef _GLIBCXX_DEBUG
+    debug_check2<ContTraits>();
+#else
+    __builtin_abort();
+#endif
+  }
+
+// Check that invalid range of debug not random iterators is detected
+template<template<typename> class ContTraits>
+  void
+  debug_check3()
+  {
+    bool test __attribute__((unused)) = true;
+
+    typedef ContTraits<int> Traits;
+    typedef typename Traits::cont_type cont_type;
+    typedef typename Traits::val_type val_type;
+    typedef std::list<val_type> list_type;
+    list_type l;
+    for (int i = 0; i != 5; ++i)
+      l.push_back(Traits::make_val(i));
+    VERIFY(l.size() == 5);
+
+    typename list_type::iterator first = l.begin(); ++first;
+    typename list_type::iterator last = first; ++last; ++last;
+    cont_type c1(first, last);
+    VERIFY(c1.size() == 2);
+
+    cont_type c2(last, first); // Expected failure
+  }
+
+template<template<typename> class ContTraits>
+  void
+  check3()
+  {
+#ifdef _GLIBCXX_DEBUG
+    debug_check3<ContTraits>();
+#else
+    __builtin_abort();
+#endif
+  }
diff --git a/libstdc++-v3/testsuite/util/debug/insert_neg.h b/libstdc++-v3/testsuite/util/debug/insert_neg.h
new file mode 100644 (file)
index 0000000..7c2634d
--- /dev/null
@@ -0,0 +1,132 @@
+// Copyright (C) 2010 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 <list>
+#include <testsuite_hooks.h>
+
+template<template <typename> class ContTraits>
+  void
+  debug_check1()
+  {
+    bool test __attribute__((unused)) = true;
+
+    typedef ContTraits<int> Traits;
+    typedef typename Traits::cont_type cont_type;
+    typedef typename Traits::val_type val_type;
+    typedef std::vector<val_type> vector_type;
+
+    vector_type v;
+    for (int i = 0; i != 5; ++i)
+      v.push_back(Traits::make_val(i));
+    VERIFY(v.size() == 5);
+
+    const val_type* first = &v.front() + 1;
+    const val_type* last = first + 2;
+
+    cont_type c1;
+    Traits::insert(c1, first, last);
+    VERIFY(c1.size() == 2);
+
+    cont_type c2;
+    Traits::insert(c2, last, first);  // Expected failure
+  }
+
+template<template <typename> class ContTraits>
+  void
+  check1()
+  {
+#ifdef _GLIBCXX_DEBUG
+    debug_check1<ContTraits>();
+#else
+    __builtin_abort();
+#endif
+  }
+
+template<template <typename> class ContTraits>
+  void
+  debug_check2()
+  {
+    bool test __attribute__((unused)) = true;
+
+    typedef ContTraits<int> Traits;
+    typedef typename Traits::cont_type cont_type;
+    typedef typename Traits::val_type val_type;
+    typedef std::vector<val_type> vector_type;
+
+    vector_type v;
+    for (int i = 0; i != 5; ++i)
+      v.push_back(Traits::make_val(i));
+    VERIFY(v.size() == 5);
+
+    typename vector_type::iterator first = v.begin() + 1;
+    typename vector_type::iterator last = first + 2;
+    cont_type c1;
+    Traits::insert(c1, first, last);
+    VERIFY(c1.size() == 2);
+
+    cont_type c2;
+    Traits::insert(c2, last, first); // Expected failure
+  }
+
+template<template <typename> class ContTraits>
+  void
+  check2()
+  {
+#ifdef _GLIBCXX_DEBUG
+    debug_check2<ContTraits>();
+#else
+    __builtin_abort();
+#endif
+  }
+
+template<template <typename> class ContTraits>
+  void
+  debug_check3()
+  {
+    bool test __attribute__((unused)) = true;
+
+    typedef ContTraits<int> Traits;
+    typedef typename Traits::cont_type cont_type;
+    typedef typename Traits::val_type val_type;
+    typedef std::list<val_type> list_type;
+
+    list_type l;
+    for (int i = 0; i != 5; ++i)
+      l.push_back(Traits::make_val(i));
+    VERIFY(l.size() == 5);
+
+    typename list_type::iterator first = l.begin(); ++first;
+    typename list_type::iterator last = first; ++last; ++last;
+    cont_type c1;
+    Traits::insert(c1, first, last);
+    VERIFY(c1.size() == 2);
+
+    cont_type c2;
+    Traits::insert(c2, last, first); // Expected failure
+  }
+
+template<template <typename> class ContTraits>
+  void
+  check3()
+  {
+#ifdef _GLIBCXX_DEBUG
+    debug_check3<ContTraits>();
+#else
+    __builtin_abort();
+#endif
+  }