From 7181e991b54aaee6a21afb372611523a09a0dc00 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Dumont?= Date: Tue, 16 Oct 2012 19:57:03 +0000 Subject: [PATCH] formatter.h (_Debug_msg_id): Add __msg_bucket_index_oob. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2012-10-16 François Dumont * include/debug/formatter.h (_Debug_msg_id): Add __msg_bucket_index_oob. * include/debug/macros.h (__glibcxx_check_bucket_index): New. * include/debug/unordered_set (unordered_set<>::begin(size_type)): Add check on bucket index. (unordered_set<>::begin(size_type) const): Likewise. (unordered_set<>::cbegin(size_type) const): Likewise. (unordered_set<>::end(size_type)): Likewise. (unordered_set<>::end(size_type) const): Likewise. (unordered_set<>::cend(size_type) const): Likewise. (unordered_set<>::bucket_size(size_type)): Likewise. (unordered_multiset<>::begin(size_type)): Likewise. (unordered_multiset<>::begin(size_type) const): Likewise. (unordered_multiset<>::cbegin(size_type) const): Likewise. (unordered_multiset<>::end(size_type)): Likewise. (unordered_multiset<>::end(size_type) const): Likewise. (unordered_multiset<>::cend(size_type) const): Likewise. (unordered_multiset<>::bucket_size(size_type)): Likewise. * include/debug/unordered_map (unordered_map<>::begin(size_type)): Likewise. (unordered_map<>::begin(size_type) const): Likewise. (unordered_map<>::cbegin(size_type) const): Likewise. (unordered_map<>::end(size_type)): Likewise. (unordered_map<>::end(size_type) const): Likewise. (unordered_map<>::cend(size_type) const): Likewise. (unordered_map<>::bucket_size(size_type)): Likewise. (unordered_multimap<>::begin(size_type)): Likewise. (unordered_multimap<>::begin(size_type) const): Likewise. (unordered_multimap<>::cbegin(size_type) const): Likewise. (unordered_multimap<>::end(size_type)): Likewise. (unordered_multimap<>::end(size_type) const): Likewise. (unordered_multimap<>::cend(size_type) const): Likewise. (unordered_multimap<>::bucket_size(size_type)): Likewise. * testsuite/23_containers/unordered_map/debug/bucket_size_neg.cc: New. * testsuite/23_containers/unordered_map/debug/begin1_neg.cc: New. * testsuite/23_containers/unordered_map/debug/begin2_neg.cc: New. * testsuite/23_containers/unordered_map/debug/cbegin_neg.cc: New. * testsuite/23_containers/unordered_map/debug/end1_neg.cc: New. * testsuite/23_containers/unordered_map/debug/end2_neg.cc: New. * testsuite/23_containers/unordered_map/debug/cend_neg.cc: New. * testsuite/23_containers/unordered_multimap/debug/bucket_size_neg.cc: New. * testsuite/23_containers/unordered_multimap/debug/begin1_neg.cc: New. * testsuite/23_containers/unordered_multimap/debug/begin2_neg.cc: New. * testsuite/23_containers/unordered_multimap/debug/cbegin_neg.cc: New. * testsuite/23_containers/unordered_multimap/debug/end1_neg.cc: New. * testsuite/23_containers/unordered_multimap/debug/end2_neg.cc: New. * testsuite/23_containers/unordered_multimap/debug/cend_neg.cc: New. * testsuite/23_containers/unordered_set/debug/bucket_size_neg.cc: New. * testsuite/23_containers/unordered_set/debug/begin1_neg.cc: New. * testsuite/23_containers/unordered_set/debug/begin2_neg.cc: New. * testsuite/23_containers/unordered_set/debug/cbegin_neg.cc: New. * testsuite/23_containers/unordered_set/debug/end1_neg.cc: New. * testsuite/23_containers/unordered_set/debug/end2_neg.cc: New. * testsuite/23_containers/unordered_set/debug/cend_neg.cc: New. * testsuite/23_containers/unordered_multiset/debug/bucket_size_neg.cc: New. * testsuite/23_containers/unordered_multiset/debug/begin1_neg.cc: New. * testsuite/23_containers/unordered_multiset/debug/begin2_neg.cc: New. * testsuite/23_containers/unordered_multiset/debug/cbegin_neg.cc: New. * testsuite/23_containers/unordered_multiset/debug/end1_neg.cc: New. * testsuite/23_containers/unordered_multiset/debug/end2_neg.cc: New. * testsuite/23_containers/unordered_multiset/debug/cend_neg.cc: New. From-SVN: r192512 --- libstdc++-v3/ChangeLog | 68 ++++++++++++++++++++ libstdc++-v3/include/debug/formatter.h | 6 +- libstdc++-v3/include/debug/macros.h | 10 ++- libstdc++-v3/include/debug/unordered_map | 74 ++++++++++++++++++---- libstdc++-v3/include/debug/unordered_set | 74 ++++++++++++++++++---- libstdc++-v3/src/c++11/debug.cc | 4 +- .../unordered_map/debug/begin1_neg.cc | 34 ++++++++++ .../unordered_map/debug/begin2_neg.cc | 35 ++++++++++ .../unordered_map/debug/bucket_size_neg.cc | 34 ++++++++++ .../unordered_map/debug/cbegin_neg.cc | 34 ++++++++++ .../23_containers/unordered_map/debug/cend_neg.cc | 34 ++++++++++ .../23_containers/unordered_map/debug/end1_neg.cc | 34 ++++++++++ .../23_containers/unordered_map/debug/end2_neg.cc | 35 ++++++++++ .../unordered_multimap/debug/begin1_neg.cc | 34 ++++++++++ .../unordered_multimap/debug/begin2_neg.cc | 35 ++++++++++ .../unordered_multimap/debug/bucket_size_neg.cc | 34 ++++++++++ .../unordered_multimap/debug/cbegin_neg.cc | 34 ++++++++++ .../unordered_multimap/debug/cend_neg.cc | 34 ++++++++++ .../unordered_multimap/debug/end1_neg.cc | 34 ++++++++++ .../unordered_multimap/debug/end2_neg.cc | 35 ++++++++++ .../unordered_multiset/debug/begin1_neg.cc | 34 ++++++++++ .../unordered_multiset/debug/begin2_neg.cc | 35 ++++++++++ .../unordered_multiset/debug/bucket_size_neg.cc | 34 ++++++++++ .../unordered_multiset/debug/cbegin_neg.cc | 34 ++++++++++ .../unordered_multiset/debug/cend_neg.cc | 34 ++++++++++ .../unordered_multiset/debug/end1_neg.cc | 34 ++++++++++ .../unordered_multiset/debug/end2_neg.cc | 35 ++++++++++ .../unordered_set/debug/begin1_neg.cc | 34 ++++++++++ .../unordered_set/debug/begin2_neg.cc | 35 ++++++++++ .../unordered_set/debug/bucket_size_neg.cc | 34 ++++++++++ .../unordered_set/debug/cbegin_neg.cc | 34 ++++++++++ .../23_containers/unordered_set/debug/cend_neg.cc | 34 ++++++++++ .../23_containers/unordered_set/debug/end1_neg.cc | 34 ++++++++++ .../23_containers/unordered_set/debug/end2_neg.cc | 35 ++++++++++ 34 files changed, 1168 insertions(+), 28 deletions(-) create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_map/debug/begin1_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_map/debug/begin2_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_map/debug/bucket_size_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_map/debug/cbegin_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_map/debug/cend_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_map/debug/end1_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_map/debug/end2_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/begin1_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/begin2_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/bucket_size_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/cbegin_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/cend_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/end1_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/end2_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/begin1_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/begin2_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/bucket_size_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/cbegin_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/cend_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/end1_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/end2_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_set/debug/begin1_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_set/debug/begin2_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_set/debug/bucket_size_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_set/debug/cbegin_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_set/debug/cend_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_set/debug/end1_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_set/debug/end2_neg.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 01537a7..3527fbc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,71 @@ +2012-10-16 François Dumont + + * include/debug/formatter.h (_Debug_msg_id): Add + __msg_bucket_index_oob. + * include/debug/macros.h (__glibcxx_check_bucket_index): New. + * include/debug/unordered_set (unordered_set<>::begin(size_type)): + Add check on bucket index. + (unordered_set<>::begin(size_type) const): Likewise. + (unordered_set<>::cbegin(size_type) const): Likewise. + (unordered_set<>::end(size_type)): Likewise. + (unordered_set<>::end(size_type) const): Likewise. + (unordered_set<>::cend(size_type) const): Likewise. + (unordered_set<>::bucket_size(size_type)): Likewise. + (unordered_multiset<>::begin(size_type)): Likewise. + (unordered_multiset<>::begin(size_type) const): Likewise. + (unordered_multiset<>::cbegin(size_type) const): Likewise. + (unordered_multiset<>::end(size_type)): Likewise. + (unordered_multiset<>::end(size_type) const): Likewise. + (unordered_multiset<>::cend(size_type) const): Likewise. + (unordered_multiset<>::bucket_size(size_type)): Likewise. + * include/debug/unordered_map (unordered_map<>::begin(size_type)): + Likewise. + (unordered_map<>::begin(size_type) const): Likewise. + (unordered_map<>::cbegin(size_type) const): Likewise. + (unordered_map<>::end(size_type)): Likewise. + (unordered_map<>::end(size_type) const): Likewise. + (unordered_map<>::cend(size_type) const): Likewise. + (unordered_map<>::bucket_size(size_type)): Likewise. + (unordered_multimap<>::begin(size_type)): Likewise. + (unordered_multimap<>::begin(size_type) const): Likewise. + (unordered_multimap<>::cbegin(size_type) const): Likewise. + (unordered_multimap<>::end(size_type)): Likewise. + (unordered_multimap<>::end(size_type) const): Likewise. + (unordered_multimap<>::cend(size_type) const): Likewise. + (unordered_multimap<>::bucket_size(size_type)): Likewise. + * testsuite/23_containers/unordered_map/debug/bucket_size_neg.cc: + New. + * testsuite/23_containers/unordered_map/debug/begin1_neg.cc: New. + * testsuite/23_containers/unordered_map/debug/begin2_neg.cc: New. + * testsuite/23_containers/unordered_map/debug/cbegin_neg.cc: New. + * testsuite/23_containers/unordered_map/debug/end1_neg.cc: New. + * testsuite/23_containers/unordered_map/debug/end2_neg.cc: New. + * testsuite/23_containers/unordered_map/debug/cend_neg.cc: New. + * testsuite/23_containers/unordered_multimap/debug/bucket_size_neg.cc: + New. + * testsuite/23_containers/unordered_multimap/debug/begin1_neg.cc: New. + * testsuite/23_containers/unordered_multimap/debug/begin2_neg.cc: New. + * testsuite/23_containers/unordered_multimap/debug/cbegin_neg.cc: New. + * testsuite/23_containers/unordered_multimap/debug/end1_neg.cc: New. + * testsuite/23_containers/unordered_multimap/debug/end2_neg.cc: New. + * testsuite/23_containers/unordered_multimap/debug/cend_neg.cc: New. + * testsuite/23_containers/unordered_set/debug/bucket_size_neg.cc: + New. + * testsuite/23_containers/unordered_set/debug/begin1_neg.cc: New. + * testsuite/23_containers/unordered_set/debug/begin2_neg.cc: New. + * testsuite/23_containers/unordered_set/debug/cbegin_neg.cc: New. + * testsuite/23_containers/unordered_set/debug/end1_neg.cc: New. + * testsuite/23_containers/unordered_set/debug/end2_neg.cc: New. + * testsuite/23_containers/unordered_set/debug/cend_neg.cc: New. + * testsuite/23_containers/unordered_multiset/debug/bucket_size_neg.cc: + New. + * testsuite/23_containers/unordered_multiset/debug/begin1_neg.cc: New. + * testsuite/23_containers/unordered_multiset/debug/begin2_neg.cc: New. + * testsuite/23_containers/unordered_multiset/debug/cbegin_neg.cc: New. + * testsuite/23_containers/unordered_multiset/debug/end1_neg.cc: New. + * testsuite/23_containers/unordered_multiset/debug/end2_neg.cc: New. + * testsuite/23_containers/unordered_multiset/debug/cend_neg.cc: New. + 2012-10-15 Matthias Klose * configure.host: Match arm*-*-linux-* for ARM Linux/GNU. diff --git a/libstdc++-v3/include/debug/formatter.h b/libstdc++-v3/include/debug/formatter.h index 8f36285..9bed998 100644 --- a/libstdc++-v3/include/debug/formatter.h +++ b/libstdc++-v3/include/debug/formatter.h @@ -107,11 +107,13 @@ namespace __gnu_debug __msg_insert_after_end, __msg_erase_after_bad, __msg_valid_range2, - // unordered sequence local iterators + // unordered container local iterators __msg_local_iter_compare_bad, __msg_non_empty_range, // self move assign - __msg_self_move_assign + __msg_self_move_assign, + // unordered container buckets + __msg_bucket_index_oob }; class _Error_formatter diff --git a/libstdc++-v3/include/debug/macros.h b/libstdc++-v3/include/debug/macros.h index 1b78719..a8e2f5f 100644 --- a/libstdc++-v3/include/debug/macros.h +++ b/libstdc++-v3/include/debug/macros.h @@ -202,11 +202,19 @@ _GLIBCXX_DEBUG_VERIFY(!_Last._M_is_before_begin(), \ // Verify that the subscript _N is less than the container's size. #define __glibcxx_check_subscript(_N) \ _GLIBCXX_DEBUG_VERIFY(_N < this->size(), \ - _M_message(__gnu_debug::__msg_subscript_oob) \ + _M_message(__gnu_debug::__msg_subscript_oob) \ ._M_sequence(*this, "this") \ ._M_integer(_N, #_N) \ ._M_integer(this->size(), "size")) +// Verify that the bucket _N is less than the container's buckets count. +#define __glibcxx_check_bucket_index(_N) \ +_GLIBCXX_DEBUG_VERIFY(_N < this->bucket_count(), \ + _M_message(__gnu_debug::__msg_bucket_index_oob) \ + ._M_sequence(*this, "this") \ + ._M_integer(_N, #_N) \ + ._M_integer(this->bucket_count(), "size")) + // Verify that the container is nonempty #define __glibcxx_check_nonempty() \ _GLIBCXX_DEBUG_VERIFY(! this->empty(), \ diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index 96cb148..e980d8c 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -183,27 +183,52 @@ namespace __debug // local versions local_iterator begin(size_type __b) - { return local_iterator(_Base::begin(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return local_iterator(_Base::begin(__b), __b, this); + } local_iterator end(size_type __b) - { return local_iterator(_Base::end(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return local_iterator(_Base::end(__b), __b, this); + } const_local_iterator begin(size_type __b) const - { return const_local_iterator(_Base::begin(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::begin(__b), __b, this); + } const_local_iterator end(size_type __b) const - { return const_local_iterator(_Base::end(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::end(__b), __b, this); + } const_local_iterator cbegin(size_type __b) const - { return const_local_iterator(_Base::cbegin(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::cbegin(__b), __b, this); + } const_local_iterator cend(size_type __b) const - { return const_local_iterator(_Base::cend(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::cend(__b), __b, this); + } + + size_type + bucket_size(size_type __b) const + { + __glibcxx_check_bucket_index(__b); + return _Base::bucket_size(__b); + } template std::pair @@ -598,27 +623,52 @@ namespace __debug // local versions local_iterator begin(size_type __b) - { return local_iterator(_Base::begin(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return local_iterator(_Base::begin(__b), __b, this); + } local_iterator end(size_type __b) - { return local_iterator(_Base::end(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return local_iterator(_Base::end(__b), __b, this); + } const_local_iterator begin(size_type __b) const - { return const_local_iterator(_Base::begin(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::begin(__b), __b, this); + } const_local_iterator end(size_type __b) const - { return const_local_iterator(_Base::end(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::end(__b), __b, this); + } const_local_iterator cbegin(size_type __b) const - { return const_local_iterator(_Base::cbegin(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::cbegin(__b), __b, this); + } const_local_iterator cend(size_type __b) const - { return const_local_iterator(_Base::cend(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::cend(__b), __b, this); + } + + size_type + bucket_size(size_type __b) const + { + __glibcxx_check_bucket_index(__b); + return _Base::bucket_size(__b); + } template iterator diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index 7996763..276821d 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -183,27 +183,52 @@ namespace __debug // local versions local_iterator begin(size_type __b) - { return local_iterator(_Base::begin(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return local_iterator(_Base::begin(__b), __b, this); + } local_iterator end(size_type __b) - { return local_iterator(_Base::end(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return local_iterator(_Base::end(__b), __b, this); + } const_local_iterator begin(size_type __b) const - { return const_local_iterator(_Base::begin(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::begin(__b), __b, this); + } const_local_iterator end(size_type __b) const - { return const_local_iterator(_Base::end(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::end(__b), __b, this); + } const_local_iterator cbegin(size_type __b) const - { return const_local_iterator(_Base::cbegin(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::cbegin(__b), __b, this); + } const_local_iterator cend(size_type __b) const - { return const_local_iterator(_Base::cend(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::cend(__b), __b, this); + } + + size_type + bucket_size(size_type __b) const + { + __glibcxx_check_bucket_index(__b); + return _Base::bucket_size(__b); + } template std::pair @@ -593,27 +618,52 @@ namespace __debug // local versions local_iterator begin(size_type __b) - { return local_iterator(_Base::begin(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return local_iterator(_Base::begin(__b), __b, this); + } local_iterator end(size_type __b) - { return local_iterator(_Base::end(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return local_iterator(_Base::end(__b), __b, this); + } const_local_iterator begin(size_type __b) const - { return const_local_iterator(_Base::begin(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::begin(__b), __b, this); + } const_local_iterator end(size_type __b) const - { return const_local_iterator(_Base::end(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::end(__b), __b, this); + } const_local_iterator cbegin(size_type __b) const - { return const_local_iterator(_Base::cbegin(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::cbegin(__b), __b, this); + } const_local_iterator cend(size_type __b) const - { return const_local_iterator(_Base::cend(__b), __b, this); } + { + __glibcxx_check_bucket_index(__b); + return const_local_iterator(_Base::cend(__b), __b, this); + } + + size_type + bucket_size(size_type __b) const + { + __glibcxx_check_bucket_index(__b); + return _Base::bucket_size(__b); + } template iterator diff --git a/libstdc++-v3/src/c++11/debug.cc b/libstdc++-v3/src/c++11/debug.cc index f0ab4bc..6cd93d1 100644 --- a/libstdc++-v3/src/c++11/debug.cc +++ b/libstdc++-v3/src/c++11/debug.cc @@ -178,7 +178,9 @@ namespace __gnu_debug "attempt to compare local iterators from different unordered container" " buckets", "function requires a non-empty iterator range [%1.name;, %2.name;)", - "attempt to self move assign" + "attempt to self move assign", + "attempt to access container with out-of-bounds bucket index %2;," + " container only holds %3; buckets" }; void diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/begin1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/begin1_neg.cc new file mode 100644 index 0000000..63bdb53 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/begin1_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + um.begin(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/begin2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/begin2_neg.cc new file mode 100644 index 0000000..5f8c177 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/begin2_neg.cc @@ -0,0 +1,35 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + const std::unordered_map& cum = um; + cum.begin(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/bucket_size_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/bucket_size_neg.cc new file mode 100644 index 0000000..17e2875 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/bucket_size_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + um.bucket_size(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/cbegin_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/cbegin_neg.cc new file mode 100644 index 0000000..8147256 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/cbegin_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + um.cbegin(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/cend_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/cend_neg.cc new file mode 100644 index 0000000..0eb4800 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/cend_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + um.cend(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/end1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/end1_neg.cc new file mode 100644 index 0000000..028efed --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/end1_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + um.end(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/end2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/end2_neg.cc new file mode 100644 index 0000000..fe25ad6 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/end2_neg.cc @@ -0,0 +1,35 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + const std::unordered_map& cum = um; + cum.end(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/begin1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/begin1_neg.cc new file mode 100644 index 0000000..bf70732 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/begin1_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_multimap um; + um.begin(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/begin2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/begin2_neg.cc new file mode 100644 index 0000000..5f8c177 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/begin2_neg.cc @@ -0,0 +1,35 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + const std::unordered_map& cum = um; + cum.begin(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/bucket_size_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/bucket_size_neg.cc new file mode 100644 index 0000000..17e2875 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/bucket_size_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + um.bucket_size(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/cbegin_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/cbegin_neg.cc new file mode 100644 index 0000000..8147256 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/cbegin_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + um.cbegin(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/cend_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/cend_neg.cc new file mode 100644 index 0000000..0eb4800 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/cend_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + um.cend(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/end1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/end1_neg.cc new file mode 100644 index 0000000..028efed --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/end1_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + um.end(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/end2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/end2_neg.cc new file mode 100644 index 0000000..fe25ad6 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/end2_neg.cc @@ -0,0 +1,35 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um; + const std::unordered_map& cum = um; + cum.end(um.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/begin1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/begin1_neg.cc new file mode 100644 index 0000000..1f2ee73 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/begin1_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_multiset us; + us.begin(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/begin2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/begin2_neg.cc new file mode 100644 index 0000000..e768a54 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/begin2_neg.cc @@ -0,0 +1,35 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_multiset us; + const std::unordered_multiset& cus = us; + cus.begin(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/bucket_size_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/bucket_size_neg.cc new file mode 100644 index 0000000..14928c6 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/bucket_size_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_multiset us; + us.bucket_size(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/cbegin_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/cbegin_neg.cc new file mode 100644 index 0000000..0e5a26c --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/cbegin_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_multiset us; + us.cbegin(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/cend_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/cend_neg.cc new file mode 100644 index 0000000..55d2bb2 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/cend_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_multiset us; + us.cend(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/end1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/end1_neg.cc new file mode 100644 index 0000000..4fc054a --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/end1_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_multiset us; + us.end(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/end2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/end2_neg.cc new file mode 100644 index 0000000..e057828 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/end2_neg.cc @@ -0,0 +1,35 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_multiset us; + const std::unordered_multiset& cus = us; + cus.end(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/begin1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/begin1_neg.cc new file mode 100644 index 0000000..2d3b274 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/begin1_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_set us; + us.begin(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/begin2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/begin2_neg.cc new file mode 100644 index 0000000..7836ec2 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/begin2_neg.cc @@ -0,0 +1,35 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_set us; + const std::unordered_set& cus = us; + cus.begin(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/bucket_size_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/bucket_size_neg.cc new file mode 100644 index 0000000..5a6f5bb --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/bucket_size_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_set us; + us.bucket_size(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/cbegin_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/cbegin_neg.cc new file mode 100644 index 0000000..5e444ad --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/cbegin_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_set us; + us.cbegin(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/cend_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/cend_neg.cc new file mode 100644 index 0000000..9fb847b --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/cend_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_set us; + us.cend(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/end1_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/end1_neg.cc new file mode 100644 index 0000000..704e610 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/end1_neg.cc @@ -0,0 +1,34 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_set us; + us.end(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/end2_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/end2_neg.cc new file mode 100644 index 0000000..ff645b5 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/end2_neg.cc @@ -0,0 +1,35 @@ +// Copyright (C) 2012 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 +// . +// +// { dg-require-debug-mode "" } +// { dg-options "-std=c++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_set us; + const std::unordered_set& cus = us; + cus.end(us.bucket_count()); +} + +int main() +{ + test01(); + return 0; +} -- 2.7.4