]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
formatter.h (enum _Debug_msg_id): Add __msg_self_move_assign.
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 9 Mar 2012 10:37:34 +0000 (10:37 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 9 Mar 2012 10:37:34 +0000 (10:37 +0000)
2012-03-09  Paolo Carlini  <paolo.carlini@oracle.com>

* 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.

From-SVN: r185134

42 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/debug/deque
libstdc++-v3/include/debug/formatter.h
libstdc++-v3/include/debug/forward_list
libstdc++-v3/include/debug/list
libstdc++-v3/include/debug/macros.h
libstdc++-v3/include/debug/map.h
libstdc++-v3/include/debug/multimap.h
libstdc++-v3/include/debug/multiset.h
libstdc++-v3/include/debug/safe_iterator.h
libstdc++-v3/include/debug/set.h
libstdc++-v3/include/debug/string
libstdc++-v3/include/debug/unordered_map
libstdc++-v3/include/debug/unordered_set
libstdc++-v3/include/debug/vector
libstdc++-v3/src/c++11/debug.cc
libstdc++-v3/testsuite/21_strings/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/21_strings/debug/self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/debug/self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/debug/self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/debug/self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/debug/self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/debug/self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/debug/self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/debug/self_move_assign_neg.cc [new file with mode: 0644]

index 78f9e672f98b8a18ff4b78afb6c9ea64fdb8da69..d43172a75ba9bf1ca420d7c9d8357dbac20b99f9 100644 (file)
@@ -1,3 +1,71 @@
+2012-03-09  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * 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  <bkoz@redhat.com>
 
        * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.0.
index ce09cb26ab733bcae256c0470cdb68e1795fc5e2..1ce416c180c822e3cf12de161bb6284cb673d4f8 100644 (file)
@@ -134,6 +134,7 @@ namespace __debug
       {
        // NB: DR 1204.
        // NB: DR 675.
+       __glibcxx_check_self_move_assign(__x);
        clear();
        swap(__x);
        return *this;
index d22a173e3ff560575b5a712a3ee4d51a47247fb7..8f36285ff172adfcd3f95188ed15bd353e55a4e2 100644 (file)
@@ -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
index 9024ff904063d534a2077ac9df25c1b285774ae1..1f887da432cca39ec63bc464333b754333fd030b 100644 (file)
@@ -131,6 +131,7 @@ namespace __debug
       {
        // NB: DR 1204.
        // NB: DR 675.
+       __glibcxx_check_self_move_assign(__list);
        clear();
        swap(__list);
        return *this;
index 856ba1a60e2218749cfe1934eb3f4aec757a06bc..df2031dd6031216ca5e3bfdb8dca90e33b01bc36 100644 (file)
@@ -135,6 +135,7 @@ namespace __debug
       {
        // NB: DR 1204.
        // NB: DR 675.
+       __glibcxx_check_self_move_assign(__x);
        clear();
        swap(__x);
        return *this;
index 07d714d353c9d740acb4f6244564e964eb4468d2..aac56348f8889becf84a2a1e7775d8c814d5814d 100644 (file)
@@ -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) \
index 9abfee867d00ad318ccef88a3045f60c452fe9ab..34b83a5cee54a6bc3d7d58b7f94a5d7e3799d740 100644 (file)
@@ -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;
index e43094f8b4df99df0fe7fbdc3c92c6e30b475af9..9157fa3458a3d56a4a1fc82efd6e97957b10236f 100644 (file)
@@ -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;
index 9f510000d4d98ad3589b44df6ebd902e644ce905..c7f38eabb40d54c5bcffec40bf66774d7f2b438a 100644 (file)
@@ -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;
index 6bb3cd24ed2700ea4b0b12cba37f14fb079d164d..b02fa7ab8ff3fb4f6c90fdc922a765c61610e80c 100644 (file)
@@ -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)
index 9846ec865f95643d95fc46e6d5ee0d5222d2643d..d6dc06f9ee20a0d01ff465bce91acb43cc399fb7 100644 (file)
@@ -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;
index 6350f6de5e562bb529fa7a97ff3057845e95ad47..954a7ddf68496c428add6137d24c0f4a80caaf80 100644 (file)
@@ -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;
index 37ca3cee7cc12514fea89c140c0f3599ad4bac5a..222bccf969f286daacefdfb4c1f538e910423a02 100644 (file)
@@ -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;
index 7323184d4389f914f447c4ffb2e8c163dc3a1220..7996763829f8830ad3d7c437bd127745f5a5b1b0 100644 (file)
@@ -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;
index d0b2627a6201ffae773fea0c4e256dbb9c150293..9e0f8439a128009b018e7b1e96e10eba9009e5a7 100644 (file)
@@ -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();
index af45ae4f543a6fb6bc7db9183a3230f954e59b59..0c746c1fc379617c0a5f0d6b64ff8e354d4f01a4 100644 (file)
@@ -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 (file)
index 0000000..a22770f
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/string>
+
+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 (file)
index 0000000..fb25aa7
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <debug/string>
+
+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 (file)
index 0000000..810c433
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <deque>
+
+void test01()
+{
+  std::deque<int> 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 (file)
index 0000000..c9b8cb2
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <deque>
+
+void test01()
+{
+  std::deque<int> 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 (file)
index 0000000..18c7f96
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <forward_list>
+
+void test01()
+{
+  std::forward_list<int> 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 (file)
index 0000000..5a0dff5
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <forward_list>
+
+void test01()
+{
+  std::forward_list<int> 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 (file)
index 0000000..5ec29e9
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <list>
+
+void test01()
+{
+  std::list<int> 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 (file)
index 0000000..f6fd4f5
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <list>
+
+void test01()
+{
+  std::list<int> 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 (file)
index 0000000..e6de5b9
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <map>
+
+void test01()
+{
+  std::map<int, int> 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 (file)
index 0000000..b9dbfac
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <map>
+
+void test01()
+{
+  std::map<int, int> 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 (file)
index 0000000..efc7f9d
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <map>
+
+void test01()
+{
+  std::multimap<int, int> 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 (file)
index 0000000..995d9c2
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <map>
+
+void test01()
+{
+  std::multimap<int, int> 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 (file)
index 0000000..1f1e61e
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <set>
+
+void test01()
+{
+  std::multiset<int> 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 (file)
index 0000000..1789c95
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <set>
+
+void test01()
+{
+  std::multiset<int> 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 (file)
index 0000000..079ecd9
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <set>
+
+void test01()
+{
+  std::set<int> 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 (file)
index 0000000..dd2bf9f
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <set>
+
+void test01()
+{
+  std::set<int> 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 (file)
index 0000000..17b442a
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <unordered_map>
+
+void test01()
+{
+  std::unordered_map<int, int> 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 (file)
index 0000000..1b4bf13
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <unordered_map>
+
+void test01()
+{
+  std::unordered_map<int, int> 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 (file)
index 0000000..0f8b314
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <unordered_map>
+
+void test01()
+{
+  std::unordered_multimap<int, int> 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 (file)
index 0000000..6b5f396
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <unordered_map>
+
+void test01()
+{
+  std::unordered_multimap<int, int> 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 (file)
index 0000000..171243b
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <unordered_set>
+
+void test01()
+{
+  std::unordered_multiset<int> 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 (file)
index 0000000..fa9cc27
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <unordered_set>
+
+void test01()
+{
+  std::unordered_multiset<int> 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 (file)
index 0000000..17101c7
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <unordered_set>
+
+void test01()
+{
+  std::unordered_set<int> 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 (file)
index 0000000..1dc3e5c
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <unordered_set>
+
+void test01()
+{
+  std::unordered_set<int> 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 (file)
index 0000000..7af4d92
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <vector>
+
+void test01()
+{
+  std::vector<int> 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 (file)
index 0000000..8cad4f2
--- /dev/null
@@ -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
+// <http://www.gnu.org/licenses/>.
+//
+// { dg-require-debug-mode "" }
+// { dg-options "-std=gnu++11" }
+// { dg-do run { xfail *-*-* } }
+
+#include <vector>
+
+void test01()
+{
+  std::vector<int> v1;
+  v1 = std::move(v1);
+}
+
+int main()
+{
+  test01();
+  return 0;
+}