swap.cc: Add in bits for non-weak systems.
authorBenjamin Kosnik <bkoz@redhat.com>
Wed, 10 Mar 2004 06:31:50 +0000 (06:31 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Wed, 10 Mar 2004 06:31:50 +0000 (06:31 +0000)
2004-03-09  Benjamin Kosnik  <bkoz@redhat.com>

* testsuite/23_containers/deque/modifiers/swap.cc: Add in bits for
non-weak systems.
* testsuite/23_containers/vector/modifiers/swap.cc: Same.
* testsuite/23_containers/set/modifiers/swap.cc: Same.
* testsuite/23_containers/multiset/modifiers/swap.cc: Same.
* testsuite/23_containers/multimap/modifiers/swap.cc: Same.
* testsuite/23_containers/map/modifiers/swap.cc: Same.
* testsuite/23_containers/list/modifiers/swap.cc: Same.

* testsuite/22_locale/locale/cons/12658_thread.cc: Catch exceptions.

From-SVN: r79224

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread.cc
libstdc++-v3/testsuite/23_containers/deque/modifiers/swap.cc
libstdc++-v3/testsuite/23_containers/list/modifiers/swap.cc
libstdc++-v3/testsuite/23_containers/map/modifiers/swap.cc
libstdc++-v3/testsuite/23_containers/multimap/modifiers/swap.cc
libstdc++-v3/testsuite/23_containers/multiset/modifiers/swap.cc
libstdc++-v3/testsuite/23_containers/set/modifiers/swap.cc
libstdc++-v3/testsuite/23_containers/vector/modifiers/swap.cc

index 1538ef3..4be32a5 100644 (file)
@@ -1,3 +1,16 @@
+2004-03-09  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * testsuite/23_containers/deque/modifiers/swap.cc: Add in bits for
+       non-weak systems.
+       * testsuite/23_containers/vector/modifiers/swap.cc: Same.
+       * testsuite/23_containers/set/modifiers/swap.cc: Same.
+       * testsuite/23_containers/multiset/modifiers/swap.cc: Same.
+       * testsuite/23_containers/multimap/modifiers/swap.cc: Same.
+       * testsuite/23_containers/map/modifiers/swap.cc: Same.
+       * testsuite/23_containers/list/modifiers/swap.cc: Same.
+
+       * testsuite/22_locale/locale/cons/12658_thread.cc: Catch exceptions.
+
 2004-03-08  Benjamin Kosnik  <bkoz@redhat.com>
        
        PR c++/13658
index 1a0534f..3a89d37 100644 (file)
@@ -32,20 +32,23 @@ const int max_locales = 10;
  
 void* thread_main(void*)
 {
-  std::locale loc_c = std::locale::classic();
-  std::locale loc[max_locales];
-  for (int j = 0; j < max_locales; ++j)
-    loc[j] = std::locale(j % 2 ? "en_US" : "fr_FR");
-
-  for (int i = 0; i < max_loop_count; ++i)
+  try
     {
-      int k = i % max_locales;
-      loc[k] = std::locale::global(loc[k]);
+      std::locale loc_c = std::locale::classic();
+      std::locale loc[max_locales];
+      for (int j = 0; j < max_locales; ++j)
+       loc[j] = std::locale(j % 2 ? "en_US" : "fr_FR");
       
-      if (i % 37 == 0)
-       loc[k] = loc[k].combine<std::ctype<char> >(loc_c);
+      for (int i = 0; i < max_loop_count; ++i)
+       {
+         int k = i % max_locales;
+         loc[k] = std::locale::global(loc[k]);
+         
+         if (i % 37 == 0)
+           loc[k] = loc[k].combine<std::ctype<char> >(loc_c);
+       }
     }
-
+  catch (...) { }
   return 0;
 }
  
@@ -53,7 +56,7 @@ int
 main()
 {
   pthread_t tid[max_thread_count];
+  
   for (int i = 0; i < max_thread_count; i++)
     pthread_create (&tid[i], NULL, thread_main, 0);
   
index 12cfa74..43dc686 100644 (file)
@@ -54,6 +54,11 @@ void test02()
   VERIFY(1 == swap_calls);
 }
 
+#if !__GXX_WEAK__ && _MT_ALLOCATOR_H
+template class __gnu_cxx::__mt_alloc<T>;
+template class __gnu_cxx::__mt_alloc<T*>;
+#endif
+
 // See c++/13658 for background info.
 int main()
 {
index d20dec0..a51d126 100644 (file)
@@ -54,6 +54,10 @@ void test02()
   VERIFY(1 == swap_calls);
 }
 
+#if !__GXX_WEAK__ && _MT_ALLOCATOR_H
+template class __gnu_cxx::__mt_alloc<std::_List_node<T> >;
+#endif
+
 // See c++/13658 for background info.
 int main()
 {
index 8fb48cb..1afde71 100644 (file)
@@ -54,6 +54,10 @@ void test02()
   VERIFY(1 == swap_calls);
 }
 
+#if !__GXX_WEAK__ && _MT_ALLOCATOR_H
+template class __gnu_cxx::__mt_alloc<std::_Rb_tree_node<std::pair<T const, int> > >;
+#endif
+
 // See c++/13658 for background info.
 int main()
 {
index 34425bd..2e87dff 100644 (file)
@@ -54,6 +54,10 @@ void test02()
   VERIFY(1 == swap_calls);
 }
 
+#if !__GXX_WEAK__ && _MT_ALLOCATOR_H
+template class __gnu_cxx::__mt_alloc<std::_Rb_tree_node<std::pair<T const, int> > >;
+#endif
+
 // See c++/13658 for background info.
 int main()
 {
index 809e153..b9632cb 100644 (file)
@@ -54,6 +54,10 @@ void test02()
   VERIFY(1 == swap_calls);
 }
 
+#if !__GXX_WEAK__ && _MT_ALLOCATOR_H
+template class __gnu_cxx::__mt_alloc<std::_Rb_tree_node<T> >;
+#endif
+
 // See c++/13658 for background info.
 int main()
 {
index dbf3b83..dcc69c9 100644 (file)
@@ -54,6 +54,10 @@ void test02()
   VERIFY(1 == swap_calls);
 }
 
+#if !__GXX_WEAK__ && _MT_ALLOCATOR_H
+template class __gnu_cxx::__mt_alloc<std::_Rb_tree_node<T> >;
+#endif
+
 // See c++/13658 for background info.
 int main()
 {
index 3122aa1..4e49635 100644 (file)
@@ -54,6 +54,10 @@ void test02()
   VERIFY(1 == swap_calls);
 }
 
+#if !__GXX_WEAK__ && _MT_ALLOCATOR_H
+template class __gnu_cxx::__mt_alloc<T>;
+#endif
+
 // See c++/13658 for background info.
 int main()
 {