From b8c555ac7c30f83f0e81aa6207757059beef1890 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 11 Dec 2014 17:58:22 +0000 Subject: [PATCH] 3.cc: Only use a thread_local when __cxa_thread_atexit_impl is available. * testsuite/30_threads/condition_variable/members/3.cc: Only use a thread_local when __cxa_thread_atexit_impl is available. From-SVN: r218638 --- libstdc++-v3/ChangeLog | 5 +++++ .../testsuite/30_threads/condition_variable/members/3.cc | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ea6e3322a17..70396133bc8 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2014-12-11 Jonathan Wakely + + * testsuite/30_threads/condition_variable/members/3.cc: Only use + a thread_local when __cxa_thread_atexit_impl is available. + 2014-12-10 Jonathan Wakely * include/bits/locale_facets.tcc (numpunct::_M_cache): Avoid calling diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/members/3.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/members/3.cc index 0da545d1439..1788bcfeb8f 100644 --- a/libstdc++-v3/testsuite/30_threads/condition_variable/members/3.cc +++ b/libstdc++-v3/testsuite/30_threads/condition_variable/members/3.cc @@ -41,7 +41,12 @@ void func() { std::unique_lock lock{mx}; std::notify_all_at_thread_exit(cv, std::move(lock)); +#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL + // Correct order of thread_local destruction needs __cxa_thread_atexit_impl static thread_local Inc inc; +#else + Inc inc; +#endif } int main() -- 2.30.2