From 2b336fc3ea490380d96587e145c5f66795f36b65 Mon Sep 17 00:00:00 2001 From: paolo Date: Fri, 9 Mar 2012 10:37:34 +0000 Subject: [PATCH] 2012-03-09 Paolo Carlini * include/debug/formatter.h (enum _Debug_msg_id): Add __msg_self_move_assign. * include/debug/macros.h (__glibcxx_check_self_move_assign): Add. * src/c++11/debug.cc (_S_debug_messages): Update. * include/debug/safe_iterator.h (_Safe_iterator<>::operator= (_Safe_iterator&&)): Add check for self move assignment. * include/debug/set.h: Likewise. * include/debug/unordered_map: Likewise. * include/debug/multiset.h: Likewise. * include/debug/forward_list: Likewise. * include/debug/unordered_set: Likewise. * include/debug/vector: Likewise. * include/debug/map.h: Likewise. * include/debug/deque: Likewise. * include/debug/string: Likewise. * include/debug/list: Likewise. * include/debug/multimap.h: Likewise. * testsuite/21_strings/debug/self_move_assign_neg.cc: New. * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_map/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/multimap/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_multimap/debug/ self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_multimap/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/forward_list/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_set/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/vector/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/multiset/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/list/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_multiset/debug/ self_move_assign_neg.cc: Likewise. * testsuite/23_containers/unordered_multiset/debug/ iterator_self_move_assign_neg.cc: Likewise. * testsuite/23_containers/map/debug/self_move_assign_neg.cc: Likewise. * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185134 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 68 ++++++++++++++++++++++ libstdc++-v3/include/debug/deque | 1 + libstdc++-v3/include/debug/formatter.h | 6 +- libstdc++-v3/include/debug/forward_list | 1 + libstdc++-v3/include/debug/list | 1 + libstdc++-v3/include/debug/macros.h | 8 ++- libstdc++-v3/include/debug/map.h | 3 +- libstdc++-v3/include/debug/multimap.h | 3 +- libstdc++-v3/include/debug/multiset.h | 3 +- libstdc++-v3/include/debug/safe_iterator.h | 3 + libstdc++-v3/include/debug/set.h | 3 +- libstdc++-v3/include/debug/string | 1 + libstdc++-v3/include/debug/unordered_map | 4 +- libstdc++-v3/include/debug/unordered_set | 4 +- libstdc++-v3/include/debug/vector | 1 + libstdc++-v3/src/c++11/debug.cc | 5 +- .../debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../21_strings/debug/self_move_assign_neg.cc | 34 +++++++++++ .../deque/debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../deque/debug/self_move_assign_neg.cc | 34 +++++++++++ .../debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../forward_list/debug/self_move_assign_neg.cc | 34 +++++++++++ .../list/debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../list/debug/self_move_assign_neg.cc | 34 +++++++++++ .../map/debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../map/debug/self_move_assign_neg.cc | 34 +++++++++++ .../debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../multimap/debug/self_move_assign_neg.cc | 34 +++++++++++ .../debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../multiset/debug/self_move_assign_neg.cc | 34 +++++++++++ .../set/debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../set/debug/self_move_assign_neg.cc | 34 +++++++++++ .../debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../unordered_map/debug/self_move_assign_neg.cc | 34 +++++++++++ .../debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../debug/self_move_assign_neg.cc | 34 +++++++++++ .../debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../debug/self_move_assign_neg.cc | 34 +++++++++++ .../debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../unordered_set/debug/self_move_assign_neg.cc | 34 +++++++++++ .../vector/debug/iterator_self_move_assign_neg.cc | 35 +++++++++++ .../vector/debug/self_move_assign_neg.cc | 34 +++++++++++ 42 files changed, 1001 insertions(+), 11 deletions(-) create mode 100644 libstdc++-v3/testsuite/21_strings/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/21_strings/debug/self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/deque/debug/self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/list/debug/self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/map/debug/self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/multimap/debug/self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/multiset/debug/self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/set/debug/self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc create mode 100644 libstdc++-v3/testsuite/23_containers/vector/debug/self_move_assign_neg.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 78f9e67..d43172a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,71 @@ +2012-03-09 Paolo Carlini + + * include/debug/formatter.h (enum _Debug_msg_id): Add + __msg_self_move_assign. + * include/debug/macros.h (__glibcxx_check_self_move_assign): Add. + * src/c++11/debug.cc (_S_debug_messages): Update. + * include/debug/safe_iterator.h (_Safe_iterator<>::operator= + (_Safe_iterator&&)): Add check for self move assignment. + * include/debug/set.h: Likewise. + * include/debug/unordered_map: Likewise. + * include/debug/multiset.h: Likewise. + * include/debug/forward_list: Likewise. + * include/debug/unordered_set: Likewise. + * include/debug/vector: Likewise. + * include/debug/map.h: Likewise. + * include/debug/deque: Likewise. + * include/debug/string: Likewise. + * include/debug/list: Likewise. + * include/debug/multimap.h: Likewise. + * testsuite/21_strings/debug/self_move_assign_neg.cc: New. + * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: + Likewise. + * testsuite/23_containers/unordered_map/debug/ + iterator_self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: + Likewise. + * testsuite/23_containers/multimap/debug/ + iterator_self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: + Likewise. + * testsuite/23_containers/unordered_multimap/debug/ + self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/unordered_multimap/debug/ + iterator_self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: + Likewise. + * testsuite/23_containers/forward_list/debug/ + iterator_self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: + Likewise. + * testsuite/23_containers/unordered_set/debug/ + iterator_self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: + Likewise. + * testsuite/23_containers/vector/debug/ + iterator_self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: + Likewise. + * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: + Likewise. + * testsuite/23_containers/multiset/debug/ + iterator_self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/list/debug/self_move_assign_neg.cc: + Likewise. + * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: + Likewise. + * testsuite/23_containers/unordered_multiset/debug/ + self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/unordered_multiset/debug/ + iterator_self_move_assign_neg.cc: Likewise. + * testsuite/23_containers/map/debug/self_move_assign_neg.cc: + Likewise. + * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: + Likewise. + 2012-03-08 Benjamin Kosnik * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.0. diff --git a/libstdc++-v3/include/debug/deque b/libstdc++-v3/include/debug/deque index ce09cb2..1ce416c 100644 --- a/libstdc++-v3/include/debug/deque +++ b/libstdc++-v3/include/debug/deque @@ -134,6 +134,7 @@ namespace __debug { // NB: DR 1204. // NB: DR 675. + __glibcxx_check_self_move_assign(__x); clear(); swap(__x); return *this; diff --git a/libstdc++-v3/include/debug/formatter.h b/libstdc++-v3/include/debug/formatter.h index d22a173..8f36285 100644 --- a/libstdc++-v3/include/debug/formatter.h +++ b/libstdc++-v3/include/debug/formatter.h @@ -1,6 +1,6 @@ // Debug-mode error formatting implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -109,7 +109,9 @@ namespace __gnu_debug __msg_valid_range2, // unordered sequence local iterators __msg_local_iter_compare_bad, - __msg_non_empty_range + __msg_non_empty_range, + // self move assign + __msg_self_move_assign }; class _Error_formatter diff --git a/libstdc++-v3/include/debug/forward_list b/libstdc++-v3/include/debug/forward_list index 9024ff9..1f887da 100644 --- a/libstdc++-v3/include/debug/forward_list +++ b/libstdc++-v3/include/debug/forward_list @@ -131,6 +131,7 @@ namespace __debug { // NB: DR 1204. // NB: DR 675. + __glibcxx_check_self_move_assign(__list); clear(); swap(__list); return *this; diff --git a/libstdc++-v3/include/debug/list b/libstdc++-v3/include/debug/list index 856ba1a..df2031d 100644 --- a/libstdc++-v3/include/debug/list +++ b/libstdc++-v3/include/debug/list @@ -135,6 +135,7 @@ namespace __debug { // NB: DR 1204. // NB: DR 675. + __glibcxx_check_self_move_assign(__x); clear(); swap(__x); return *this; diff --git a/libstdc++-v3/include/debug/macros.h b/libstdc++-v3/include/debug/macros.h index 07d714d..aac5634 100644 --- a/libstdc++-v3/include/debug/macros.h +++ b/libstdc++-v3/include/debug/macros.h @@ -1,6 +1,6 @@ // Debugging support implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -310,6 +310,12 @@ _GLIBCXX_DEBUG_VERIFY(std::__is_heap(_First, _Last, _Pred), \ ._M_iterator(_Last, #_Last) \ ._M_string(#_Pred)) +// Verify that the container is not self move assigned +#define __glibcxx_check_self_move_assign(_Other) \ +_GLIBCXX_DEBUG_VERIFY(this != &_Other, \ + _M_message(__gnu_debug::__msg_self_move_assign) \ + ._M_sequence(*this, "this")) + #ifdef _GLIBCXX_DEBUG_PEDANTIC # define __glibcxx_check_string(_String) _GLIBCXX_DEBUG_ASSERT(_String != 0) # define __glibcxx_check_string_len(_String,_Len) \ diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h index 9abfee8..34b83a5 100644 --- a/libstdc++-v3/include/debug/map.h +++ b/libstdc++-v3/include/debug/map.h @@ -1,6 +1,6 @@ // Debugging map implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -120,6 +120,7 @@ namespace __debug { // NB: DR 1204. // NB: DR 675. + __glibcxx_check_self_move_assign(__x); clear(); swap(__x); return *this; diff --git a/libstdc++-v3/include/debug/multimap.h b/libstdc++-v3/include/debug/multimap.h index e43094f..9157fa3 100644 --- a/libstdc++-v3/include/debug/multimap.h +++ b/libstdc++-v3/include/debug/multimap.h @@ -1,6 +1,6 @@ // Debugging multimap implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -121,6 +121,7 @@ namespace __debug { // NB: DR 1204. // NB: DR 675. + __glibcxx_check_self_move_assign(__x); clear(); swap(__x); return *this; diff --git a/libstdc++-v3/include/debug/multiset.h b/libstdc++-v3/include/debug/multiset.h index 9f51000..c7f38ea 100644 --- a/libstdc++-v3/include/debug/multiset.h +++ b/libstdc++-v3/include/debug/multiset.h @@ -1,6 +1,6 @@ // Debugging multiset implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -120,6 +120,7 @@ namespace __debug { // NB: DR 1204. // NB: DR 675. + __glibcxx_check_self_move_assign(__x); clear(); swap(__x); return *this; diff --git a/libstdc++-v3/include/debug/safe_iterator.h b/libstdc++-v3/include/debug/safe_iterator.h index 6bb3cd2..b02fa7a 100644 --- a/libstdc++-v3/include/debug/safe_iterator.h +++ b/libstdc++-v3/include/debug/safe_iterator.h @@ -234,6 +234,9 @@ namespace __gnu_debug _Safe_iterator& operator=(_Safe_iterator&& __x) { + _GLIBCXX_DEBUG_VERIFY(this != &__x, + _M_message(__msg_self_move_assign) + ._M_iterator(*this, "this")); _GLIBCXX_DEBUG_VERIFY(!__x._M_singular() || __x._M_current == _Iterator(), _M_message(__msg_copy_singular) diff --git a/libstdc++-v3/include/debug/set.h b/libstdc++-v3/include/debug/set.h index 9846ec8..d6dc06f 100644 --- a/libstdc++-v3/include/debug/set.h +++ b/libstdc++-v3/include/debug/set.h @@ -1,6 +1,6 @@ // Debugging set implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -120,6 +120,7 @@ namespace __debug { // NB: DR 1204. // NB: DR 675. + __glibcxx_check_self_move_assign(__x); clear(); swap(__x); return *this; diff --git a/libstdc++-v3/include/debug/string b/libstdc++-v3/include/debug/string index 6350f6d..954a7dd 100644 --- a/libstdc++-v3/include/debug/string +++ b/libstdc++-v3/include/debug/string @@ -155,6 +155,7 @@ namespace __gnu_debug basic_string& operator=(basic_string&& __str) { + __glibcxx_check_self_move_assign(__str); *static_cast<_Base*>(this) = std::move(__str); this->_M_invalidate_all(); return *this; diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index 37ca3ce..222bccf 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -1,6 +1,6 @@ // Debugging unordered_map/unordered_multimap implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -128,6 +128,7 @@ namespace __debug { // NB: DR 1204. // NB: DR 675. + __glibcxx_check_self_move_assign(__x); clear(); swap(__x); return *this; @@ -542,6 +543,7 @@ namespace __debug { // NB: DR 1204. // NB: DR 675. + __glibcxx_check_self_move_assign(__x); clear(); swap(__x); return *this; diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index 7323184..7996763 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -1,6 +1,6 @@ // Debugging unordered_set/unordered_multiset implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -128,6 +128,7 @@ namespace __debug { // NB: DR 1204. // NB: DR 675. + __glibcxx_check_self_move_assign(__x); clear(); swap(__x); return *this; @@ -537,6 +538,7 @@ namespace __debug { // NB: DR 1204. // NB: DR 675. + __glibcxx_check_self_move_assign(__x); clear(); swap(__x); return *this; diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector index d0b2627..9e0f843 100644 --- a/libstdc++-v3/include/debug/vector +++ b/libstdc++-v3/include/debug/vector @@ -158,6 +158,7 @@ namespace __debug vector& operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) { + __glibcxx_check_self_move_assign(__x); _Base::operator=(std::move(__x)); this->_M_invalidate_all(); _M_update_guaranteed_capacity(); diff --git a/libstdc++-v3/src/c++11/debug.cc b/libstdc++-v3/src/c++11/debug.cc index af45ae4..0c746c1 100644 --- a/libstdc++-v3/src/c++11/debug.cc +++ b/libstdc++-v3/src/c++11/debug.cc @@ -1,7 +1,7 @@ // Debugging mode support code -*- C++ -*- // Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -// 2011 Free Software Foundation, Inc. +// 2011, 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 @@ -177,7 +177,8 @@ namespace __gnu_debug // std::unordered_container::local_iterator "attempt to compare local iterators from different unordered container" " buckets", - "function requires a non-empty iterator range [%1.name;, %2.name;)" + "function requires a non-empty iterator range [%1.name;, %2.name;)", + "attempt to self move assign" }; void diff --git a/libstdc++-v3/testsuite/21_strings/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/21_strings/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..a22770f --- /dev/null +++ b/libstdc++-v3/testsuite/21_strings/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + __gnu_debug::string s1; + auto it1 = s1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/21_strings/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/21_strings/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..fb25aa7 --- /dev/null +++ b/libstdc++-v3/testsuite/21_strings/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + __gnu_debug::string s1; + s1 = std::move(s1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..810c433 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/deque/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::deque d1; + auto it1 = d1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/deque/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..c9b8cb2 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/deque/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::deque d1; + d1 = std::move(d1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..18c7f96 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::forward_list fl1; + auto it1 = fl1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..5a0dff5 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/forward_list/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::forward_list fl1; + fl1 = std::move(fl1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..5ec29e9 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/list/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::list l1; + auto it1 = l1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/list/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/list/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..f6fd4f5 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/list/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::list l1; + l1 = std::move(l1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..e6de5b9 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/map/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::map m1; + auto it1 = m1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/map/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/map/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..b9dbfac --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/map/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::map m1; + m1 = std::move(m1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..efc7f9d --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multimap/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::multimap mm1; + auto it1 = mm1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/multimap/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/multimap/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..995d9c2 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multimap/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::multimap mm1; + mm1 = std::move(mm1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..1f1e61e --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multiset/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::multiset ms1; + auto it1 = ms1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/multiset/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..1789c95 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multiset/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::multiset ms1; + ms1 = std::move(ms1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..079ecd9 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/set/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::set s1; + auto it1 = s1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/set/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/set/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..dd2bf9f --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/set/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::set s1; + s1 = std::move(s1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..17b442a --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um1; + auto it1 = um1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..1b4bf13 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_map um1; + um1 = std::move(um1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..0f8b314 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_multimap umm1; + auto it1 = umm1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..6b5f396 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_multimap umm1; + umm1 = std::move(umm1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..171243b --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_multiset ums1; + auto it1 = ums1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..fa9cc27 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_multiset ums1; + ums1 = std::move(ums1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..17101c7 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_set us1; + auto it1 = us1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..1dc3e5c --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::unordered_set us1; + us1 = std::move(us1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc new file mode 100644 index 0000000..7af4d92 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/vector/debug/iterator_self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::vector v1; + auto it1 = v1.begin(); + it1 = std::move(it1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/self_move_assign_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/self_move_assign_neg.cc new file mode 100644 index 0000000..8cad4f2 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/vector/debug/self_move_assign_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=gnu++11" } +// { dg-do run { xfail *-*-* } } + +#include + +void test01() +{ + std::vector v1; + v1 = std::move(v1); +} + +int main() +{ + test01(); + return 0; +} -- 2.7.4