From fac992ef71601620e3ed3ea15c13ecf61b62f92a Mon Sep 17 00:00:00 2001 From: bkoz Date: Sat, 9 Oct 2004 02:30:10 +0000 Subject: 2004-10-08 Benjamin Kosnik * acconfig.h: Add _GLIBCXX_USE___CXA_ATEXIT. * acinclude.m4 (GLIBCXX_ENABLE_CXA_ATEXIT): New. * configure.ac: Call GLIBCXX_ENABLE_CXA_EXIT. * configure: Regenerate. * src/mt_allocator.cc (__pool::~__pool): Make conditional on _GLIBCXX_USE___CXA_ATEXIT macro. * docs/html/ext/mt_allocator.html: Add note about deallocation. * testsuite/ext/mt_allocator/deallocate_local-2.cc: Guard checks with _GLIBCXX_USE___CXA_ATEXIT. * testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Same. * testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Same. * testsuite/ext/mt_allocator/deallocate_global-4.cc: Same. * testsuite/ext/mt_allocator/deallocate_global-2.cc: Same. * testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Same. * testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Same. * testsuite/ext/mt_allocator/deallocate_local-4.cc: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88809 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-2.cc | 2 ++ libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-4.cc | 2 ++ libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc | 2 ++ libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc | 2 ++ libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc | 2 ++ libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-4.cc | 2 ++ libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc | 2 ++ libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc | 2 ++ 8 files changed, 16 insertions(+) (limited to 'libstdc++-v3/testsuite') diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-2.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-2.cc index f0484872989..01baada5470 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-2.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-2.cc @@ -31,8 +31,10 @@ struct count_check count_check() {} ~count_check() { +#ifdef _GLIBCXX_USE___CXA_ATEXIT if (count != 0) throw std::exception(); +#endif } }; diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-4.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-4.cc index 02c6a4c4c68..3d5b96233f5 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-4.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-4.cc @@ -31,8 +31,10 @@ struct count_check count_check() {} ~count_check() { +#ifdef _GLIBCXX_USE___CXA_ATEXIT if (count != 0) throw std::runtime_error("count isn't zero"); +#endif } }; diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc index 1f0ac281af7..3ec3abcd6b6 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc @@ -31,8 +31,10 @@ struct count_check count_check() {} ~count_check() { +#ifdef _GLIBCXX_USE___CXA_ATEXIT if (count != 0) throw std::runtime_error("count isn't zero"); +#endif } }; diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc index 10efea66ec6..398ef31d39d 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc @@ -31,8 +31,10 @@ struct count_check count_check() {} ~count_check() { +#ifdef _GLIBCXX_USE___CXA_ATEXIT if (count != 0) throw std::runtime_error("count isn't zero"); +#endif } }; diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc index a6af89f11f0..b8e2784f484 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc @@ -31,8 +31,10 @@ struct count_check count_check() {} ~count_check() { +#ifdef _GLIBCXX_USE___CXA_ATEXIT if (count != 0) throw std::runtime_error("count isn't zero"); +#endif } }; diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-4.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-4.cc index c194b977d57..1df7fb500cd 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-4.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-4.cc @@ -31,8 +31,10 @@ struct count_check count_check() {} ~count_check() { +#ifdef _GLIBCXX_USE___CXA_ATEXIT if (count != 0) throw std::runtime_error("count isn't zero"); +#endif } }; diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc index 5664d3caff8..2191264e942 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc @@ -31,8 +31,10 @@ struct count_check count_check() {} ~count_check() { +#ifdef _GLIBCXX_USE___CXA_ATEXIT if (count != 0) throw std::runtime_error("count isn't zero"); +#endif } }; diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc index 973f758d98d..6094a718a0e 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc @@ -31,8 +31,10 @@ struct count_check count_check() {} ~count_check() { +#ifdef _GLIBCXX_USE___CXA_ATEXIT if (count != 0) throw std::runtime_error("count isn't zero"); +#endif } }; -- cgit v1.2.1