diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-11 17:58:22 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-11 17:58:22 +0000 |
commit | c99e7c8e753d174b58da041f010c3c73861ed341 (patch) | |
tree | ca2042ff8cca3622d9bccd5e0da2e4c17c756382 /libstdc++-v3 | |
parent | fddcd674e0ec14a43179ec870b9be55404e9c98c (diff) | |
download | gcc-c99e7c8e753d174b58da041f010c3c73861ed341.tar.gz |
* testsuite/30_threads/condition_variable/members/3.cc: Only use
a thread_local when __cxa_thread_atexit_impl is available.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218638 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/30_threads/condition_variable/members/3.cc | 5 |
2 files changed, 10 insertions, 0 deletions
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 <jwakely@redhat.com> + + * 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 <jwakely@redhat.com> * 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<std::mutex> 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() |