diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9b3c14e880d02fd91f327c9a37f8039a7ad9d009..ad1fb5d541317a09213b507c1a371e779b66e694 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,37 @@
+2005-09-11  Paolo Carlini  <pcarlini@suse.de>
+
+	PR libstdc++/23781
+	* include/bits/stl_list.h (_List_iterator<>::
+	_List_iterator(_List_node_base*), _List_const_iterator<>::
+	_List_const_iterator(const _List_node_base*)): Make explicit.
+	(list<>::begin(), list<>::end(), list<>::pop_back()): Adjust
+	consistently.
+	* include/bits/list.tcc (list<>::insert, list<>::erase): Adjust
+	consistently.
+	* include/bits/stl_tree.h (_Rb_tree_iterator<>::
+	_Rb_tree_iterator(_Link_type), _Rb_tree_const_iterator<>::
+	_Rb_tree_const_iterator(_Link_type)): Make explicit.
+	(_Rb_tree<>::begin(), _Rb_tree<>::end()): Adjust consistently.
+	* include/ext/slist (_Slist_iterator<>::_Slist_iterator(_Node*)):
+	Make explicit.
+	(slist<>::erase(iterator), slist<>::erase(iterator, iterator)):
+	Adjust consistently.
+	* include/tr1/hashtable (hashtable_iterator<>::
+	hashtable_iterator(hash_node<>**)): Make explicit.
+	* testsuite/23_containers/list/23781.cc: New.
+	* testsuite/23_containers/map/23781.cc: Likewise.
+	* testsuite/23_containers/multimap/23781.cc: Likewise.
+	* testsuite/23_containers/multiset/23781.cc: Likewise.
+	* testsuite/23_containers/set/23781.cc: Likewise.
+	* testsuite/ext/slist/23781.cc: Likewise.
+	* testsuite/tr1/6_containers/unordered/23781.cc: Likewise.
+	* testsuite/23_containers/map/operators/1_neg.cc: Adjust dg-error
+	line numbers.
+	* testsuite/23_containers/set/operators/1_neg.cc: Likewise.
+
+	* include/tr1/array (array<>::begin(), array<>::end()): Adjust
+	stylistically for consistency with the other containers.
+
 2005-09-10  Joseph S. Myers  <joseph@codesourcery.com>
 
 	* testsuite/26_numerics/cmath/c99_classification_macros_c.cc:
diff --git a/libstdc++-v3/include/bits/list.tcc b/libstdc++-v3/include/bits/list.tcc
index 088a2ea86d8001ea2b76f64811e0249018938182..ece04300f31933e8ca10af888177cc1c46a83a4a 100644
--- a/libstdc++-v3/include/bits/list.tcc
+++ b/libstdc++-v3/include/bits/list.tcc
@@ -86,7 +86,7 @@ namespace _GLIBCXX_STD
     {
       _Node* __tmp = _M_create_node(__x);
       __tmp->hook(__position._M_node);
-      return __tmp;
+      return iterator(__tmp);
     }
 
   template<typename _Tp, typename _Alloc>
@@ -94,7 +94,7 @@ namespace _GLIBCXX_STD
     list<_Tp, _Alloc>::
     erase(iterator __position)
     {
-      iterator __ret = __position._M_node->_M_next;
+      iterator __ret = iterator(__position._M_node->_M_next);
       _M_erase(__position);
       return __ret;
     }
diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h
index ba9a3d0d8cb88a806275f3fbe46d16e0a6ac1091..6aa67fe55fd8043fec4eeddcf06abfadf06ff80b 100644
--- a/libstdc++-v3/include/bits/stl_list.h
+++ b/libstdc++-v3/include/bits/stl_list.h
@@ -122,6 +122,7 @@ namespace _GLIBCXX_STD
       _List_iterator()
       : _M_node() { }
 
+      explicit
       _List_iterator(_List_node_base* __x)
       : _M_node(__x) { }
 
@@ -199,6 +200,7 @@ namespace _GLIBCXX_STD
       _List_const_iterator()
       : _M_node() { }
 
+      explicit
       _List_const_iterator(const _List_node_base* __x)
       : _M_node(__x) { }
 
@@ -574,7 +576,7 @@ namespace _GLIBCXX_STD
        */
       iterator
       begin()
-      { return this->_M_impl._M_node._M_next; }
+      { return iterator(this->_M_impl._M_node._M_next); }
 
       /**
        *  Returns a read-only (constant) iterator that points to the
@@ -583,7 +585,7 @@ namespace _GLIBCXX_STD
        */
       const_iterator
       begin() const
-      { return this->_M_impl._M_node._M_next; }
+      { return const_iterator(this->_M_impl._M_node._M_next); }
 
       /**
        *  Returns a read/write iterator that points one past the last
@@ -591,7 +593,8 @@ namespace _GLIBCXX_STD
        *  order.
        */
       iterator
-      end() { return &this->_M_impl._M_node; }
+      end()
+      { return iterator(&this->_M_impl._M_node); }
 
       /**
        *  Returns a read-only (constant) iterator that points one past
@@ -600,7 +603,7 @@ namespace _GLIBCXX_STD
        */
       const_iterator
       end() const
-      { return &this->_M_impl._M_node; }
+      { return const_iterator(&this->_M_impl._M_node); }
 
       /**
        *  Returns a read/write reverse iterator that points to the last
@@ -769,7 +772,7 @@ namespace _GLIBCXX_STD
        */
       void
       pop_back()
-      { this->_M_erase(this->_M_impl._M_node._M_prev); }
+      { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); }
 
       /**
        *  @brief  Inserts given value into %list before specified iterator.
diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h
index 756b5cdc06addc53639a2afea4bb69c6a7550c7c..fab8117edbe43ac8b62d6cb311d22cfdf607d378 100644
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -164,6 +164,7 @@ namespace std
       _Rb_tree_iterator()
       : _M_node() { }
 
+      explicit
       _Rb_tree_iterator(_Link_type __x)
       : _M_node(__x) { }
 
@@ -235,6 +236,7 @@ namespace std
       _Rb_tree_const_iterator()
       : _M_node() { }
 
+      explicit
       _Rb_tree_const_iterator(_Link_type __x)
       : _M_node(__x) { }
 
@@ -579,22 +581,28 @@ namespace std
 
       iterator
       begin()
-      { return static_cast<_Link_type>(this->_M_impl._M_header._M_left); }
+      { 
+	return iterator(static_cast<_Link_type>
+			(this->_M_impl._M_header._M_left));
+      }
 
       const_iterator
       begin() const
-      {
-	return static_cast<_Const_Link_type>
-	  (this->_M_impl._M_header._M_left);
+      { 
+	return const_iterator(static_cast<_Const_Link_type>
+			      (this->_M_impl._M_header._M_left));
       }
 
       iterator
       end()
-      { return static_cast<_Link_type>(&this->_M_impl._M_header); }
+      { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); }
 
       const_iterator
       end() const
-      { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
+      { 
+	return const_iterator(static_cast<_Const_Link_type>
+			      (&this->_M_impl._M_header));
+      }
 
       reverse_iterator
       rbegin()
@@ -641,12 +649,12 @@ namespace std
       insert_equal(iterator __position, const value_type& __x);
 
       template<typename _InputIterator>
-      void
-      insert_unique(_InputIterator __first, _InputIterator __last);
+        void
+        insert_unique(_InputIterator __first, _InputIterator __last);
 
       template<typename _InputIterator>
-      void
-      insert_equal(_InputIterator __first, _InputIterator __last);
+        void
+        insert_equal(_InputIterator __first, _InputIterator __last);
 
       void
       erase(iterator __position);
diff --git a/libstdc++-v3/include/ext/slist b/libstdc++-v3/include/ext/slist
index 1c2421fb2ac215eda68f928e4ac60edfd3ed3f21..49ce77ea6ea8d7fc7b674e65f5853ad1f33a8143 100644
--- a/libstdc++-v3/include/ext/slist
+++ b/libstdc++-v3/include/ext/slist
@@ -190,6 +190,7 @@ namespace __gnu_cxx
       typedef _Ref             reference;
       typedef _Slist_node<_Tp> _Node;
 
+      explicit
       _Slist_iterator(_Node* __x)
       : _Slist_iterator_base(__x) {}
 
@@ -601,20 +602,26 @@ namespace __gnu_cxx
 
       iterator
       erase_after(iterator __before_first, iterator __last)
-      { return iterator((_Node*) this->_M_erase_after(__before_first._M_node,
-						      __last._M_node)); }
+      { 
+	return iterator((_Node*) this->_M_erase_after(__before_first._M_node,
+						      __last._M_node));
+      }
 
       iterator
       erase(iterator __pos)
-      { return (_Node*) this->_M_erase_after(__slist_previous(&this->_M_head,
-							      __pos._M_node)); }
+      { 
+	return iterator((_Node*) this->_M_erase_after
+			(__slist_previous(&this->_M_head, __pos._M_node)));
+      }
 
       iterator
       erase(iterator __first, iterator __last)
-      { return (_Node*) this->_M_erase_after(__slist_previous(&this->_M_head,
-							      __first._M_node),
-					     __last._M_node); }
-
+      { 
+	return iterator((_Node*) this->_M_erase_after
+			(__slist_previous(&this->_M_head, __first._M_node),
+			 __last._M_node));
+      }
+      
       void
       resize(size_type new_size, const _Tp& __x);
 
diff --git a/libstdc++-v3/include/tr1/array b/libstdc++-v3/include/tr1/array
index 4b500fc48a2176eb2214b184da5d2f33e8f273b3..096df4f48acec4ab845026afd7baaa9c752c6759 100644
--- a/libstdc++-v3/include/tr1/array
+++ b/libstdc++-v3/include/tr1/array
@@ -75,21 +75,21 @@ namespace tr1
       swap(array&);
 
       // Iterators.
-      iterator 
+      iterator
       begin()
-      { return &_M_instance[0]; }
+      { return iterator(&_M_instance[0]); }
 
-      const_iterator 
+      const_iterator
       begin() const 
-      { return &_M_instance[0]; }
+      { return const_iterator(&_M_instance[0]); }
 
-      iterator 
+      iterator
       end() 
-      { return &_M_instance[_Nm]; }
+      { return iterator(&_M_instance[_Nm]); }
 
-      const_iterator 
+      const_iterator
       end() const
-      { return &_M_instance[_Nm]; }
+      { return const_iterator(&_M_instance[_Nm]); }
 
       reverse_iterator 
       rbegin()
diff --git a/libstdc++-v3/include/tr1/hashtable b/libstdc++-v3/include/tr1/hashtable
index af43da2814f720e91a8bb9ecc08be0ae223e8203..790e7e3042709ff95fe70a1fa5b3beacdd305c47 100644
--- a/libstdc++-v3/include/tr1/hashtable
+++ b/libstdc++-v3/include/tr1/hashtable
@@ -261,7 +261,8 @@ namespace Internal
       hashtable_iterator(hash_node<Value, cache>* p,
 			 hash_node<Value, cache>** b)
       : hashtable_iterator_base<Value, cache>(p, b) { }
-  
+
+      explicit
       hashtable_iterator(hash_node<Value, cache>** b)
       : hashtable_iterator_base<Value, cache>(*b, b) { }
   
diff --git a/libstdc++-v3/testsuite/23_containers/list/23781.cc b/libstdc++-v3/testsuite/23_containers/list/23781.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e91536ad1d573d5a9072e2141385c8b251cf5c09
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/list/23781.cc
@@ -0,0 +1,36 @@
+// 2005-09-10  Paolo Carlini  <pcarlini@suse.de>
+//
+// Copyright (C) 2005 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// { dg-do compile }
+
+// libstdc++/23781
+#include <list>
+
+std::list<int>::iterator it = NULL; // { dg-error "conversion" }
+std::list<int>::const_iterator cit = NULL; // { dg-error "conversion" }
diff --git a/libstdc++-v3/testsuite/23_containers/map/23781.cc b/libstdc++-v3/testsuite/23_containers/map/23781.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ddd92900ab6ce2154c283c90825321bfedbe1327
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/map/23781.cc
@@ -0,0 +1,36 @@
+// 2005-09-10  Paolo Carlini  <pcarlini@suse.de>
+//
+// Copyright (C) 2005 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// { dg-do compile }
+
+// libstdc++/23781
+#include <map>
+
+std::map<int, int>::iterator it = NULL; // { dg-error "conversion" }
+std::map<int, int>::const_iterator cit = NULL; // { dg-error "conversion" }
diff --git a/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc b/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc
index dad06f3435c44294256d26550c022b46e1d238c0..405f8e4caa7dad1c10c43499c3ba5e118ab61f01 100644
--- a/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc
@@ -1,6 +1,6 @@
 // { dg-do compile }
 
-// Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2004, 2005 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
@@ -41,5 +41,5 @@ void test01()
   test &= itr == mapByName.end(); // { dg-error "no" } 
 }
  
-// { dg-error "candidates are" "" { target *-*-* } 209 }
-// { dg-error "candidates are" "" { target *-*-* } 213 }
+// { dg-error "candidates are" "" { target *-*-* } 210 }
+// { dg-error "candidates are" "" { target *-*-* } 214 }
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/23781.cc b/libstdc++-v3/testsuite/23_containers/multimap/23781.cc
new file mode 100644
index 0000000000000000000000000000000000000000..06ef245aa5f442263dec866639e3330fa6362662
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multimap/23781.cc
@@ -0,0 +1,36 @@
+// 2005-09-10  Paolo Carlini  <pcarlini@suse.de>
+//
+// Copyright (C) 2005 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// { dg-do compile }
+
+// libstdc++/23781
+#include <map>
+
+std::multimap<int, int>::iterator it = NULL; // { dg-error "conversion" }
+std::multimap<int, int>::const_iterator cit = NULL; // { dg-error "conversion" }
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/23781.cc b/libstdc++-v3/testsuite/23_containers/multiset/23781.cc
new file mode 100644
index 0000000000000000000000000000000000000000..197c870792024255311dbd9cdabe41e6a489029d
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multiset/23781.cc
@@ -0,0 +1,36 @@
+// 2005-09-10  Paolo Carlini  <pcarlini@suse.de>
+//
+// Copyright (C) 2005 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// { dg-do compile }
+
+// libstdc++/23781
+#include <set>
+
+std::multiset<int>::iterator it = NULL; // { dg-error "conversion" }
+std::multiset<int>::const_iterator cit = NULL; // { dg-error "conversion" }
diff --git a/libstdc++-v3/testsuite/23_containers/set/23781.cc b/libstdc++-v3/testsuite/23_containers/set/23781.cc
new file mode 100644
index 0000000000000000000000000000000000000000..54d689c830002f9ced707477f9588e8aa62f5339
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/set/23781.cc
@@ -0,0 +1,36 @@
+// 2005-09-10  Paolo Carlini  <pcarlini@suse.de>
+//
+// Copyright (C) 2005 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// { dg-do compile }
+
+// libstdc++/23781
+#include <set>
+
+std::set<int>::iterator it = NULL; // { dg-error "conversion" }
+std::set<int>::const_iterator cit = NULL; // { dg-error "conversion" }
diff --git a/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc b/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc
index c88b977cc52488ce3ede5bd06f759cc70eb7fbbd..a0286b0566d98294a1a814ebb7780555acf9809f 100644
--- a/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc
@@ -1,6 +1,6 @@
 // { dg-do compile }
 
-// Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2004, 2005 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
@@ -39,5 +39,5 @@ void test01()
   test &= itr == setByName.end(); // { dg-error "no" } 
 }
 
-// { dg-error "candidates are" "" { target *-*-* } 283 }
-// { dg-error "candidates are" "" { target *-*-* } 287 }
+// { dg-error "candidates are" "" { target *-*-* } 285 }
+// { dg-error "candidates are" "" { target *-*-* } 289 }
diff --git a/libstdc++-v3/testsuite/ext/slist/23781.cc b/libstdc++-v3/testsuite/ext/slist/23781.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7ec332bd97d253a7face35304a570a28dd217804
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/slist/23781.cc
@@ -0,0 +1,36 @@
+// 2005-09-10  Paolo Carlini  <pcarlini@suse.de>
+//
+// Copyright (C) 2005 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// { dg-do compile }
+
+// libstdc++/23781
+#include <ext/slist>
+
+__gnu_cxx::slist<int>::iterator it = NULL; // { dg-error "conversion" }
+__gnu_cxx::slist<int>::const_iterator cit = NULL; // { dg-error "conversion" }
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered/23781.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered/23781.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a5479932315058b2b693e6648c436edbdb015ae8
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered/23781.cc
@@ -0,0 +1,43 @@
+// 2005-09-10  Paolo Carlini  <pcarlini@suse.de>
+//
+// Copyright (C) 2005 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// { dg-do compile }
+
+// libstdc++/23781
+#include <tr1/unordered_map>
+#include <tr1/unordered_set>
+
+std::tr1::unordered_map<int, int>::iterator it1 = NULL; // { dg-error "conversion" }
+std::tr1::unordered_map<int, int>::const_iterator cit1 = NULL; // { dg-error "conversion" }
+std::tr1::unordered_multimap<int, int>::iterator it2 = NULL; // { dg-error "conversion" }
+std::tr1::unordered_multimap<int, int>::const_iterator cit2 = NULL; // { dg-error "conversion" }
+std::tr1::unordered_multiset<int>::iterator it3 = NULL; // { dg-error "conversion" }
+std::tr1::unordered_multiset<int>::const_iterator cit3 = NULL; // { dg-error "conversion" }
+std::tr1::unordered_set<int>::iterator it4 = NULL; // { dg-error "conversion" }
+std::tr1::unordered_set<int>::const_iterator cit4 = NULL; // { dg-error "conversion" }