Commit 6dde938c by Benjamin Kosnik Committed by Benjamin Kosnik

swap.cc: Add in bits for non-weak systems.


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
parent 8a308d45
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> 2004-03-08 Benjamin Kosnik <bkoz@redhat.com>
PR c++/13658 PR c++/13658
......
...@@ -32,20 +32,23 @@ const int max_locales = 10; ...@@ -32,20 +32,23 @@ const int max_locales = 10;
void* thread_main(void*) void* thread_main(void*)
{ {
std::locale loc_c = std::locale::classic(); try
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)
{ {
int k = i % max_locales; std::locale loc_c = std::locale::classic();
loc[k] = std::locale::global(loc[k]); 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) for (int i = 0; i < max_loop_count; ++i)
loc[k] = loc[k].combine<std::ctype<char> >(loc_c); {
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; return 0;
} }
...@@ -53,7 +56,7 @@ int ...@@ -53,7 +56,7 @@ int
main() main()
{ {
pthread_t tid[max_thread_count]; pthread_t tid[max_thread_count];
for (int i = 0; i < max_thread_count; i++) for (int i = 0; i < max_thread_count; i++)
pthread_create (&tid[i], NULL, thread_main, 0); pthread_create (&tid[i], NULL, thread_main, 0);
......
...@@ -54,6 +54,11 @@ void test02() ...@@ -54,6 +54,11 @@ void test02()
VERIFY(1 == swap_calls); 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. // See c++/13658 for background info.
int main() int main()
{ {
......
...@@ -54,6 +54,10 @@ void test02() ...@@ -54,6 +54,10 @@ void test02()
VERIFY(1 == swap_calls); 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. // See c++/13658 for background info.
int main() int main()
{ {
......
...@@ -54,6 +54,10 @@ void test02() ...@@ -54,6 +54,10 @@ void test02()
VERIFY(1 == swap_calls); 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. // See c++/13658 for background info.
int main() int main()
{ {
......
...@@ -54,6 +54,10 @@ void test02() ...@@ -54,6 +54,10 @@ void test02()
VERIFY(1 == swap_calls); 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. // See c++/13658 for background info.
int main() int main()
{ {
......
...@@ -54,6 +54,10 @@ void test02() ...@@ -54,6 +54,10 @@ void test02()
VERIFY(1 == swap_calls); 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. // See c++/13658 for background info.
int main() int main()
{ {
......
...@@ -54,6 +54,10 @@ void test02() ...@@ -54,6 +54,10 @@ void test02()
VERIFY(1 == swap_calls); 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. // See c++/13658 for background info.
int main() int main()
{ {
......
...@@ -54,6 +54,10 @@ void test02() ...@@ -54,6 +54,10 @@ void test02()
VERIFY(1 == swap_calls); VERIFY(1 == swap_calls);
} }
#if !__GXX_WEAK__ && _MT_ALLOCATOR_H
template class __gnu_cxx::__mt_alloc<T>;
#endif
// See c++/13658 for background info. // See c++/13658 for background info.
int main() int main()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment