mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-23 14:11:05 +08:00
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
This commit is contained in:
parent
8a308d45d5
commit
6dde938c11
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user