public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: Allow using <future> without lock free atomic int
@ 2016-11-09 21:26 Pauli
  2016-12-16 17:56 ` Jonathan Wakely
  0 siblings, 1 reply; 8+ messages in thread
From: Pauli @ 2016-11-09 21:26 UTC (permalink / raw)
  To: libstdc++, gcc-patches; +Cc: Pauli

Compiling programs using std::future for old arm processors fails. The
problem is caused by preprocessor check for atomic lock free int.

Future can be changed to work correctly without lock free atomics with
minor changes to exception_ptr implementation.

Without lock free atomics there is question if deadlock can happen. But
atomic operations can't call outside code preventing any ABBA or
recursive mutex acquiring deadlocks.
Deadlock could happen if throwing an exception or access
is_lock_free() == false atomic from asynchronous signal handler.
Throwing from signal handler is undefined behavior. I don't know about
accessing atomics from asynchronous signal handler but that feels like
undefined behavior if is_lock_free returns false.

Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735

differences to current if atomic builtins available:
* Race detector annotations that are empty by default
* Check for __gthread_active_p
* Generate x86 code uses xadd instead of xsub
This makes code a bit worse. But problem is duplicated to any other user
of __exchange_and_add. The internal API implementation should be fixed
to generate better code for all cases. But that is a follow up patch.

 ** libstdc++ test results
x86_64 build from trunk@241870 resulted to exactly same results with and
without patch. That is two localetest cases failing:
FAIL: 22_locale/numpunct/members/char/3.cc execution test
FAIL: 22_locale/time_get/get_date/wchar_t/4.cc execution test
  of expected passes		11941
  of unexpected failures	2
  of expected failures		65
  of unsupported tests		244

armv5tel from gcc-6-branch@241866 in qemu-arm-static -cpu arm926 resulted
to following differences.
Before patch:
WARNING: program timed out.
FAIL: 22_locale/locale/cons/12658_thread-2.cc execution test
FAIL: 22_locale/numpunct/members/char/3.cc execution test
FAIL: 22_locale/time_get/get_date/wchar_t/4.cc execution test
FAIL: 27_io/fpos/14775.cc execution test
  of expected passes		10628
  of unexpected failures	4
  of expected failures		66
  of unsupported tests		390

After patch:
WARNING: program timed out.
FAIL: 22_locale/locale/cons/12658_thread-1.cc execution test
WARNING: program timed out.
FAIL: 22_locale/locale/cons/12658_thread-2.cc execution test
FAIL: 22_locale/numpunct/members/char/3.cc execution test
FAIL: 22_locale/time_get/get_date/wchar_t/4.cc execution test
FAIL: 27_io/fpos/14775.cc execution test
  of expected passes		10831
  of unexpected failures	5
  of expected failures		66
  of unsupported tests		281

My cpu isn't fast enough to run 12658 thread tests in qemu.
---

2016-11-09  Pauli Nieminen  <suokkos@gmail.com>

	* include/std/future: Remove check for ATOMIC_INT_LOCK_FREE
	* libsupc++/eh_ptr.cc (exception_ptr::_M_addref)
	(exception_ptr::_M_release) (__gxx_dependent_exception_cleanup)
	(rethrow_exception): Use atomicity.h reference counting helpers.
	* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise.
	* libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise.
	* libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE
	* libsupc++/exception_ptr.h: Likewise
	* libsupc++/nested_exception.cc: Likewise
	* libsupc++/nested_exception.h: Likewise
	* src/c++11/future.cc: Likewise
	* testsuite: Remove atomic builtins check from exception_ptr,
	nested_exception, future, promise, packaged_task, async and
	shared_future.


---
 libstdc++-v3/include/std/future                    |  4 +---
 libstdc++-v3/libsupc++/eh_ptr.cc                   | 26 +++++++++++++---------
 libstdc++-v3/libsupc++/eh_throw.cc                 |  9 ++++----
 libstdc++-v3/libsupc++/eh_tm.cc                    | 11 +++++----
 libstdc++-v3/libsupc++/exception                   |  3 +--
 libstdc++-v3/libsupc++/exception_ptr.h             |  4 ----
 libstdc++-v3/libsupc++/nested_exception.cc         |  2 --
 libstdc++-v3/libsupc++/nested_exception.h          |  4 ----
 libstdc++-v3/src/c++11/future.cc                   |  4 ++--
 .../testsuite/18_support/exception_ptr/40296.cc    |  1 -
 .../18_support/exception_ptr/60612-terminate.cc    |  1 -
 .../18_support/exception_ptr/60612-unexpected.cc   |  1 -
 .../testsuite/18_support/exception_ptr/62258.cc    |  1 -
 .../testsuite/18_support/exception_ptr/64241.cc    |  1 -
 .../18_support/exception_ptr/current_exception.cc  |  1 -
 .../testsuite/18_support/exception_ptr/lifespan.cc |  1 -
 .../18_support/exception_ptr/make_exception_ptr.cc |  1 -
 .../exception_ptr/make_exception_ptr_2.cc          |  1 -
 .../testsuite/18_support/exception_ptr/move.cc     |  1 -
 .../18_support/exception_ptr/requirements.cc       |  1 -
 .../18_support/exception_ptr/requirements_neg.cc   |  1 -
 .../18_support/exception_ptr/rethrow_exception.cc  |  1 -
 .../testsuite/18_support/nested_exception/51438.cc |  1 -
 .../testsuite/18_support/nested_exception/62154.cc |  1 -
 .../testsuite/18_support/nested_exception/68139.cc |  1 -
 .../testsuite/18_support/nested_exception/cons.cc  |  1 -
 .../18_support/nested_exception/nested_ptr.cc      |  1 -
 .../nested_exception/rethrow_if_nested.cc          |  1 -
 .../18_support/nested_exception/rethrow_nested.cc  |  1 -
 .../nested_exception/throw_with_nested.cc          |  1 -
 libstdc++-v3/testsuite/30_threads/async/42819.cc   |  1 -
 libstdc++-v3/testsuite/30_threads/async/49668.cc   |  1 -
 libstdc++-v3/testsuite/30_threads/async/54297.cc   |  1 -
 libstdc++-v3/testsuite/30_threads/async/any.cc     |  1 -
 libstdc++-v3/testsuite/30_threads/async/async.cc   |  1 -
 libstdc++-v3/testsuite/30_threads/async/except.cc  |  1 -
 .../testsuite/30_threads/async/forced_unwind.cc    |  1 -
 libstdc++-v3/testsuite/30_threads/async/launch.cc  |  1 -
 libstdc++-v3/testsuite/30_threads/async/lwg2021.cc |  1 -
 libstdc++-v3/testsuite/30_threads/async/sync.cc    |  1 -
 .../testsuite/30_threads/future/cons/assign_neg.cc |  1 -
 .../testsuite/30_threads/future/cons/constexpr.cc  |  1 -
 .../testsuite/30_threads/future/cons/copy_neg.cc   |  1 -
 .../testsuite/30_threads/future/cons/default.cc    |  1 -
 .../testsuite/30_threads/future/cons/move.cc       |  1 -
 .../30_threads/future/cons/move_assign.cc          |  1 -
 .../testsuite/30_threads/future/members/45133.cc   |  1 -
 .../testsuite/30_threads/future/members/get.cc     |  1 -
 .../testsuite/30_threads/future/members/get2.cc    |  1 -
 .../testsuite/30_threads/future/members/share.cc   |  1 -
 .../testsuite/30_threads/future/members/valid.cc   |  1 -
 .../testsuite/30_threads/future/members/wait.cc    |  1 -
 .../30_threads/future/members/wait_for.cc          |  1 -
 .../30_threads/future/members/wait_until.cc        |  1 -
 .../future/requirements/explicit_instantiation.cc  |  1 -
 .../30_threads/headers/future/types_std_c++0x.cc   |  1 -
 .../testsuite/30_threads/packaged_task/49668.cc    |  1 -
 .../testsuite/30_threads/packaged_task/60564.cc    |  1 -
 .../testsuite/30_threads/packaged_task/cons/1.cc   |  1 -
 .../testsuite/30_threads/packaged_task/cons/2.cc   |  1 -
 .../testsuite/30_threads/packaged_task/cons/3.cc   |  1 -
 .../30_threads/packaged_task/cons/56492.cc         |  1 -
 .../30_threads/packaged_task/cons/alloc.cc         |  1 -
 .../30_threads/packaged_task/cons/alloc2.cc        |  1 -
 .../30_threads/packaged_task/cons/alloc_min.cc     |  1 -
 .../30_threads/packaged_task/cons/assign_neg.cc    |  1 -
 .../30_threads/packaged_task/cons/copy_neg.cc      |  1 -
 .../30_threads/packaged_task/cons/move.cc          |  1 -
 .../30_threads/packaged_task/cons/move_assign.cc   |  1 -
 .../30_threads/packaged_task/forced_unwind.cc      |  1 -
 .../packaged_task/members/at_thread_exit.cc        |  1 -
 .../30_threads/packaged_task/members/get_future.cc |  1 -
 .../packaged_task/members/get_future2.cc           |  1 -
 .../30_threads/packaged_task/members/invoke.cc     |  1 -
 .../30_threads/packaged_task/members/invoke2.cc    |  1 -
 .../30_threads/packaged_task/members/invoke3.cc    |  1 -
 .../30_threads/packaged_task/members/invoke4.cc    |  1 -
 .../30_threads/packaged_task/members/invoke5.cc    |  1 -
 .../30_threads/packaged_task/members/reset.cc      |  1 -
 .../30_threads/packaged_task/members/reset2.cc     |  1 -
 .../30_threads/packaged_task/members/swap.cc       |  1 -
 .../30_threads/packaged_task/members/valid.cc      |  1 -
 .../requirements/explicit_instantiation.cc         |  1 -
 .../30_threads/packaged_task/uses_allocator.cc     |  1 -
 libstdc++-v3/testsuite/30_threads/promise/60966.cc |  1 -
 libstdc++-v3/testsuite/30_threads/promise/69106.cc |  1 -
 .../testsuite/30_threads/promise/cons/1.cc         |  1 -
 .../testsuite/30_threads/promise/cons/alloc.cc     |  1 -
 .../testsuite/30_threads/promise/cons/alloc2.cc    |  1 -
 .../testsuite/30_threads/promise/cons/alloc_min.cc |  1 -
 .../30_threads/promise/cons/assign_neg.cc          |  1 -
 .../testsuite/30_threads/promise/cons/copy_neg.cc  |  1 -
 .../testsuite/30_threads/promise/cons/move.cc      |  1 -
 .../30_threads/promise/cons/move_assign.cc         |  1 -
 .../30_threads/promise/members/at_thread_exit.cc   |  1 -
 .../30_threads/promise/members/get_future.cc       |  1 -
 .../30_threads/promise/members/get_future2.cc      |  1 -
 .../30_threads/promise/members/set_exception.cc    |  1 -
 .../30_threads/promise/members/set_exception2.cc   |  1 -
 .../30_threads/promise/members/set_value.cc        |  1 -
 .../30_threads/promise/members/set_value2.cc       |  1 -
 .../30_threads/promise/members/set_value3.cc       |  1 -
 .../testsuite/30_threads/promise/members/swap.cc   |  1 -
 .../promise/requirements/explicit_instantiation.cc |  1 -
 .../testsuite/30_threads/promise/uses_allocator.cc |  1 -
 .../30_threads/shared_future/cons/assign.cc        |  1 -
 .../30_threads/shared_future/cons/constexpr.cc     |  1 -
 .../30_threads/shared_future/cons/copy.cc          |  1 -
 .../30_threads/shared_future/cons/default.cc       |  1 -
 .../30_threads/shared_future/cons/move.cc          |  1 -
 .../30_threads/shared_future/cons/move_assign.cc   |  1 -
 .../30_threads/shared_future/members/45133.cc      |  1 -
 .../30_threads/shared_future/members/get.cc        |  1 -
 .../30_threads/shared_future/members/get2.cc       |  1 -
 .../30_threads/shared_future/members/valid.cc      |  1 -
 .../30_threads/shared_future/members/wait.cc       |  1 -
 .../30_threads/shared_future/members/wait_for.cc   |  1 -
 .../30_threads/shared_future/members/wait_until.cc |  1 -
 .../requirements/explicit_instantiation.cc         |  1 -
 119 files changed, 30 insertions(+), 147 deletions(-)

diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future
index fea915b..1f247fa 100644
--- a/libstdc++-v3/include/std/future
+++ b/libstdc++-v3/include/std/future
@@ -183,8 +183,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     future<__async_result_of<_Fn, _Args...>>
     async(_Fn&& __fn, _Args&&... __args);
 
-#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
-  && (ATOMIC_INT_LOCK_FREE > 1)
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
 
   /// Base class and enclosing scope.
   struct __future_base
@@ -1740,7 +1739,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #endif // _GLIBCXX_ASYNC_ABI_COMPAT
 #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
-       // && ATOMIC_INT_LOCK_FREE
 
   // @} group futures
 _GLIBCXX_END_NAMESPACE_VERSION
diff --git a/libstdc++-v3/libsupc++/eh_ptr.cc b/libstdc++-v3/libsupc++/eh_ptr.cc
index f3c910b..96a2e6d 100644
--- a/libstdc++-v3/libsupc++/eh_ptr.cc
+++ b/libstdc++-v3/libsupc++/eh_ptr.cc
@@ -23,14 +23,12 @@
 // <http://www.gnu.org/licenses/>.
 
 #include <bits/c++config.h>
-#include <bits/atomic_lockfree_defines.h>
-
-#if ATOMIC_INT_LOCK_FREE > 1
 
 #define _GLIBCXX_EH_PTR_COMPAT
 
 #include <exception>
 #include <bits/exception_ptr.h>
+#include <ext/atomicity.h>
 #include "unwind-cxx.h"
 
 using namespace __cxxabiv1;
@@ -101,7 +99,9 @@ std::__exception_ptr::exception_ptr::_M_addref() noexcept
     {
       __cxa_refcounted_exception *eh =
 	__get_refcounted_exception_header_from_obj (_M_exception_object);
-      __atomic_add_fetch (&eh->referenceCount, 1, __ATOMIC_ACQ_REL);
+      _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&eh->referenceCount);
+      __gnu_cxx::__atomic_add_dispatch(&eh->referenceCount, 1);
+      _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&eh->referenceCount);
     }
 }
 
@@ -113,10 +113,12 @@ std::__exception_ptr::exception_ptr::_M_release() noexcept
     {
       __cxa_refcounted_exception *eh =
 	__get_refcounted_exception_header_from_obj (_M_exception_object);
-      if (__atomic_sub_fetch (&eh->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
+      _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&eh->referenceCount);
+      if (__gnu_cxx::__exchange_and_add_dispatch(&eh->referenceCount, -1) == 1)
         {
-	  if (eh->exc.exceptionDestructor)
-	    eh->exc.exceptionDestructor (_M_exception_object);
+          _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&eh->referenceCount);
+          if (eh->exc.exceptionDestructor)
+            eh->exc.exceptionDestructor (_M_exception_object);
 
           __cxa_free_exception (_M_exception_object);
           _M_exception_object = 0;
@@ -211,8 +213,10 @@ __gxx_dependent_exception_cleanup(_Unwind_Reason_Code code,
 
   __cxa_free_dependent_exception (dep);
 
-  if (__atomic_sub_fetch (&header->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
+  _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&header->referenceCount);
+  if (__gnu_cxx::__exchange_and_add_dispatch(&header->referenceCount, -1) == 1)
     {
+      _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&header->referenceCount);
       if (header->exc.exceptionDestructor)
 	header->exc.exceptionDestructor (header + 1);
 
@@ -230,7 +234,9 @@ std::rethrow_exception(std::exception_ptr ep)
 
   __cxa_dependent_exception *dep = __cxa_allocate_dependent_exception ();
   dep->primaryException = obj;
-  __atomic_add_fetch (&eh->referenceCount, 1,  __ATOMIC_ACQ_REL);
+  _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&eh->referenceCount);
+  __gnu_cxx::__atomic_add_dispatch(&eh->referenceCount, 1);
+  _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&eh->referenceCount);
 
   dep->unexpectedHandler = get_unexpected ();
   dep->terminateHandler = get_terminate ();
@@ -252,5 +258,3 @@ std::rethrow_exception(std::exception_ptr ep)
 }
 
 #undef _GLIBCXX_EH_PTR_COMPAT
-
-#endif
diff --git a/libstdc++-v3/libsupc++/eh_throw.cc b/libstdc++-v3/libsupc++/eh_throw.cc
index a05f4eb..118e640 100644
--- a/libstdc++-v3/libsupc++/eh_throw.cc
+++ b/libstdc++-v3/libsupc++/eh_throw.cc
@@ -23,6 +23,7 @@
 // <http://www.gnu.org/licenses/>.
 
 #include <bits/c++config.h>
+#include <ext/atomicity.h>
 #include "unwind-cxx.h"
 
 using namespace __cxxabiv1;
@@ -42,17 +43,15 @@ __gxx_exception_cleanup (_Unwind_Reason_Code code, _Unwind_Exception *exc)
   if (code != _URC_FOREIGN_EXCEPTION_CAUGHT && code != _URC_NO_REASON)
     __terminate (header->exc.terminateHandler);
 
-#if ATOMIC_INT_LOCK_FREE > 1
-  if (__atomic_sub_fetch (&header->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
+  _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&header->referenceCount);
+  if (__gnu_cxx::__exchange_and_add_dispatch(&header->referenceCount, -1) == 1)
     {
-#endif
+      _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&header->referenceCount);
       if (header->exc.exceptionDestructor)
 	header->exc.exceptionDestructor (header + 1);
 
       __cxa_free_exception (header + 1);
-#if ATOMIC_INT_LOCK_FREE > 1
     }
-#endif
 }
 
 extern "C" __cxa_refcounted_exception*
diff --git a/libstdc++-v3/libsupc++/eh_tm.cc b/libstdc++-v3/libsupc++/eh_tm.cc
index c05f611..9a7106e 100644
--- a/libstdc++-v3/libsupc++/eh_tm.cc
+++ b/libstdc++-v3/libsupc++/eh_tm.cc
@@ -23,6 +23,7 @@
 // <http://www.gnu.org/licenses/>.
 
 #include <cstdlib>
+#include <ext/atomicity.h>
 #include "unwind-cxx.h"
 
 using namespace __cxxabiv1;
@@ -45,10 +46,12 @@ free_any_cxa_exception (_Unwind_Exception *eo)
       __cxa_free_dependent_exception (dep);
     }
 
-#if __GCC_ATOMIC_INT_LOCK_FREE > 1
-  if (__atomic_sub_fetch (&h->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
-#endif
-    __cxa_free_exception (h + 1);
+  _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&h->referenceCount);
+  if (__gnu_cxx::__exchange_and_add_dispatch(&h->referenceCount, -1) == 1)
+    {
+      _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&h->referenceCount);
+      __cxa_free_exception (h + 1);
+    }
 }
 
 // Cleanup exception handling state while rolling back state for
diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception
index 8be903b..021d70e 100644
--- a/libstdc++-v3/libsupc++/exception
+++ b/libstdc++-v3/libsupc++/exception
@@ -35,7 +35,6 @@
 #pragma GCC visibility push(default)
 
 #include <bits/c++config.h>
-#include <bits/atomic_lockfree_defines.h>
 #include <bits/exception.h>
 
 extern "C++" {
@@ -139,7 +138,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
 
 #pragma GCC visibility pop
 
-#if (__cplusplus >= 201103L) && (ATOMIC_INT_LOCK_FREE > 1)
+#if (__cplusplus >= 201103L)
 #include <bits/exception_ptr.h>
 #include <bits/nested_exception.h>
 #endif
diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h
index a47a585..cce156a 100644
--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -39,10 +39,6 @@
 #include <typeinfo>
 #include <new>
 
-#if ATOMIC_INT_LOCK_FREE < 2
-#  error This platform does not support exception propagation.
-#endif
-
 extern "C++" {
 
 namespace std 
diff --git a/libstdc++-v3/libsupc++/nested_exception.cc b/libstdc++-v3/libsupc++/nested_exception.cc
index c1a7b7a..82dddb1 100644
--- a/libstdc++-v3/libsupc++/nested_exception.cc
+++ b/libstdc++-v3/libsupc++/nested_exception.cc
@@ -25,7 +25,5 @@
 
 namespace std 
 {
-#if ATOMIC_INT_LOCK_FREE > 1
   nested_exception::~nested_exception() noexcept = default;
-#endif
 } // namespace std
diff --git a/libstdc++-v3/libsupc++/nested_exception.h b/libstdc++-v3/libsupc++/nested_exception.h
index 078af0e..48bdabb 100644
--- a/libstdc++-v3/libsupc++/nested_exception.h
+++ b/libstdc++-v3/libsupc++/nested_exception.h
@@ -39,10 +39,6 @@
 #include <bits/c++config.h>
 #include <bits/move.h>
 
-#if ATOMIC_INT_LOCK_FREE < 2
-#  error This platform does not support exception propagation.
-#endif
-
 extern "C++" {
 
 namespace std
diff --git a/libstdc++-v3/src/c++11/future.cc b/libstdc++-v3/src/c++11/future.cc
index 7809a37..565188f 100644
--- a/libstdc++-v3/src/c++11/future.cc
+++ b/libstdc++-v3/src/c++11/future.cc
@@ -78,8 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   const char*
   future_error::what() const noexcept { return logic_error::what(); }
 
-#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
-  && (ATOMIC_INT_LOCK_FREE > 1)
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
   __future_base::_Result_base::_Result_base() = default;
 
   __future_base::_Result_base::~_Result_base() = default;
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
index 74307cc..a6659b8 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
index c00e287..d58f32d 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
index 2b5ec2d..cfaea5d4 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
index c83d5fb..5c15b48 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2015-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
index c1e9a05..7dbf3d6 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
@@ -17,7 +17,6 @@
 
 // { dg-options "-fno-exceptions -O0" }
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 #include <exception>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
index 79459eb..38decc1 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // 2008-05-25  Sebastian Redl  <sebastian.redl@getdesigned.at>
 
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
index ada652e..8343b49 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // 2008-05-25  Sebastian Redl  <sebastian.redl@getdesigned.at>
 
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
index b9ded35..c35525e 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
index 3787777..ad0333b 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
index 6318bc4..80c6e3e 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
index b3b9e0c..5f5f054 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
index b80d688..95ec8ab 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
index 567af32..7f2ab93 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // 2008-05-25  Sebastian Redl  <sebastian.redl@getdesigned.at>
 
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc b/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
index 04ef32f..34728043 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc b/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
index f1884a5..124e4d1 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc b/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
index bf803db..4164e91 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2015-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc b/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
index af6f90c..a1141b7 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc b/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
index 467d371..c9092bd 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
index b042084..62dd26a 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
index fd374e5..c18f6f0 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
index f768b1e..3036328 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/42819.cc b/libstdc++-v3/testsuite/30_threads/async/42819.cc
index b836877..44cb674 100644
--- a/libstdc++-v3/testsuite/30_threads/async/42819.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/42819.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/49668.cc b/libstdc++-v3/testsuite/30_threads/async/49668.cc
index fe597c0..074d9b0 100644
--- a/libstdc++-v3/testsuite/30_threads/async/49668.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/49668.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/54297.cc b/libstdc++-v3/testsuite/30_threads/async/54297.cc
index 756fd97..ed9230d 100644
--- a/libstdc++-v3/testsuite/30_threads/async/54297.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/54297.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 // { dg-require-sleep "" }
 
 // Copyright (C) 2012-2016 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/async/any.cc b/libstdc++-v3/testsuite/30_threads/async/any.cc
index a78b0e5..03c6401 100644
--- a/libstdc++-v3/testsuite/30_threads/async/any.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/any.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/async.cc b/libstdc++-v3/testsuite/30_threads/async/async.cc
index 02c497c..3de9ef6 100644
--- a/libstdc++-v3/testsuite/30_threads/async/async.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/async.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/except.cc b/libstdc++-v3/testsuite/30_threads/async/except.cc
index 1a63680..0d94916 100644
--- a/libstdc++-v3/testsuite/30_threads/async/except.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/except.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc b/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
index b344b74..c44fd29 100644
--- a/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/launch.cc b/libstdc++-v3/testsuite/30_threads/async/launch.cc
index 7064c91..6ea6834 100644
--- a/libstdc++-v3/testsuite/30_threads/async/launch.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/launch.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc b/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
index 62fbf27..3a631e9 100644
--- a/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
@@ -20,7 +20,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // LWG 2021. Further incorrect usages of result_of
 // Arguments to result_of should use decay.
diff --git a/libstdc++-v3/testsuite/30_threads/async/sync.cc b/libstdc++-v3/testsuite/30_threads/async/sync.cc
index b4d4759..7fa11c8 100644
--- a/libstdc++-v3/testsuite/30_threads/async/sync.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/sync.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
index a36dafb..467e7f0 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc b/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
index dcafe3e..b61ca13 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
@@ -2,7 +2,6 @@
 // { dg-options "-fno-inline -g0" }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 // { dg-final { scan-assembler-not "_ZNSt6futureIvEC2Ev" } }
 // { dg-final { scan-assembler-not "_ZNSt6futureIiEC2Ev" } }
 
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
index 8fc5de6..f53056d 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/default.cc b/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
index b9424be..13c6e01 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/move.cc b/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
index 63b017f..33d0b60 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
index 50971f3..910fe8e 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/45133.cc b/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
index 1f91483..e5d63bd 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/get.cc b/libstdc++-v3/testsuite/30_threads/future/members/get.cc
index b99837e..849c94a 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/get.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/get.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/get2.cc b/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
index 6a259e7..60bcb42 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/share.cc b/libstdc++-v3/testsuite/30_threads/future/members/share.cc
index cb163e2..1933725 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/share.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/share.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/valid.cc b/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
index e473dc1..5993a97 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
index 6d08243..6553890 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
index 1b8707d..457de4d 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
index ed71c50..0b54b8a 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
index 1632523..34d8733 100644
--- a/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc b/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
index 3f9d273..c8f4e53 100644
--- a/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
+++ b/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" } 
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
index 1ab9d19..cb74ab8 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
index f2f4ce9..d5c940b 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
index ce8d6c1..2297d7dc 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
index f267192..655aa40 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
index 6903778..97d7d86 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
index 718608e..b96ceb0 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2013-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
index c0830e3..7b7099d 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
index ebfc00a..726f50a 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
index e67f9fd..96f6631 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
index 1c88262..4b9cbb5 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
index 7f1156f..05de5c6 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
index 1fa2d77..f654647 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
index 2ee5018..377b29f 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
index 9059542..3c621d1 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target *-*-linux* *-*-gnu* } }
 // { dg-options "-pthread" { target *-*-linux* *-*-gnu* *-*-solaris* } }
 // { dg-require-effective-target c++11 }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
index 72d1e66..5f0c7cd 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
index 85bbf5b..c7de321 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
index 0ffd746..7b9d259 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
index fe4778a..5e09ef7 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
index 27662d9..7790729 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
index c3f5cec..411dd87 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
index fb95c00..0fa2d09 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
index 61fcb4a..fc7a33d 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
index 1581b54..6aabe0d 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
index 7581e36..dcdff24 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
index fa50b1d..466dfaa 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
index 9b26152..1ee8c27 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
index db90ff2..e119065 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
index 1e2e9e0..fcee8c5 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/60966.cc b/libstdc++-v3/testsuite/30_threads/promise/60966.cc
index 4030ff8..238dae5 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/60966.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/60966.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/69106.cc b/libstdc++-v3/testsuite/30_threads/promise/69106.cc
index 322a2f4..7201a94 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/69106.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/69106.cc
@@ -18,7 +18,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 #include <future>
 
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
index 2ca2a9e..54d1bda 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
index d23ee29..5012026 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
index e7567af..eb51229 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
index bdac11e..30d1be4 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
index 4cbef6d..caa59a5 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
index e66d047..f33673b 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
index 5518840..93a97d1 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
index 61ba488..2ec4c63 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc b/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
index 5e8d9f3..3f1a40b 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc b/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
index 209f545..0a2601d 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
index 931da71..c5c14da 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
index 3672d18..cb3d003 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
index e15d912..de725ef 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
index e3b7301..999ee31 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
index bb26948..f63c847 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
index 1fa9d53..03c9aa2 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc b/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
index b445d74..d718db9 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
index 9691ab0..8f3d534 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc b/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
index e19a891..9d10067 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
index 572c658..c8b0532 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
index d0a5fe2..98b5098 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
@@ -2,7 +2,6 @@
 // { dg-options "-fno-inline -g0" }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 // { dg-final { scan-assembler-not "_ZNSt13shared_futureIvEC2Ev" } }
 // { dg-final { scan-assembler-not "_ZNSt13shared_futureIiEC2Ev" } }
 
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
index 4628858..40eed23 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
index ba96ab3..567b2ec 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
index 3d2666c..0484053 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
index ae20b01..a6debee 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
index 4548fcc..6b2bc3c 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
index efb84df..f9447f6 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
index 20db446..3a237d7 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
index 747456c..5238821 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
index bf925f1..52058c8 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
index 714c4d2..d38fe07 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
index e99979a..2f70874 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
index a992b88..15e452b 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
-- 
2.9.3

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libstdc++: Allow using <future> without lock free atomic int
  2016-11-09 21:26 [PATCH] libstdc++: Allow using <future> without lock free atomic int Pauli
@ 2016-12-16 17:56 ` Jonathan Wakely
  2016-12-19 17:58   ` Jonathan Wakely
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Wakely @ 2016-12-16 17:56 UTC (permalink / raw)
  To: Pauli; +Cc: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 2504 bytes --]

On 09/11/16 23:26 +0200, Pauli wrote:
>Compiling programs using std::future for old arm processors fails. The
>problem is caused by preprocessor check for atomic lock free int.
>
>Future can be changed to work correctly without lock free atomics with
>minor changes to exception_ptr implementation.
>
>Without lock free atomics there is question if deadlock can happen. But
>atomic operations can't call outside code preventing any ABBA or
>recursive mutex acquiring deadlocks.
>Deadlock could happen if throwing an exception or access
>is_lock_free() == false atomic from asynchronous signal handler.
>Throwing from signal handler is undefined behavior. I don't know about
>accessing atomics from asynchronous signal handler but that feels like
>undefined behavior if is_lock_free returns false.
>
>Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
>
>differences to current if atomic builtins available:
>* Race detector annotations that are empty by default
>* Check for __gthread_active_p
>* Generate x86 code uses xadd instead of xsub
>This makes code a bit worse. But problem is duplicated to any other user
>of __exchange_and_add. The internal API implementation should be fixed
>to generate better code for all cases. But that is a follow up patch.

I'd prefer to do it so we don't change anything for the targets that
already work. Your follow-up patch missed the deadline for GCC 7 and
so will have to wait for GCC 8 now, and we don't want to pessimize
x86.

Also, I think your patch actually breaks some GNU/Linux targets,
because you removed the <atomic_lockfree_defines.h> header from
<exception>, which means that in libsupc++/guard.cc the macro
ATOMIC_INT_LOCK_FREE is no longer defined, and so _GLIBCXX_USE_FUTEX
doesn't get defined. Now arguably guard.cc should have been including
the header directly, but it still shows why such an invasive patch is
a bad idea at this stage of the GCC 7 process.

The attached patch attempts to make exception propagation work for all
targets, without changing anything if it already works.

Do you see any problems with this alternative approach?
Could you please test it for armv5te?

It passes all tests for x86_64-linux and ppc64le-linux.

For your follow-up patch, do you already have a copyright assignment
for contributions to GCC? We'll probably need that before it can be
accepted. We don't need one for this patch, because what remains of
your original patch is just the testsuite changes, which are
mechanical and not copyrightable.


[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 68760 bytes --]

commit e81e908deb699886e65cb4d614f6a0a1cf54662f
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Dec 16 15:22:21 2016 +0000

    PR64735 support exception propagation without atomics
    
    2016-11-09  Pauli Nieminen  <suokkos@gmail.com>
    	    Jonathan Wakely  <jwakely@redhat.com>
    
    	PR libstdc++/64735
    	* include/std/future: Remove check for ATOMIC_INT_LOCK_FREE
    	* libsupc++/eh_atomics.h: New file for internal use only.
    	(__eh_atomic_inc, __eh_atomic_dec): New.
    	* libsupc++/eh_ptr.cc (exception_ptr::_M_addref)
    	(exception_ptr::_M_release) (__gxx_dependent_exception_cleanup)
    	(rethrow_exception): Use eh_atomics.h reference counting helpers.
    	* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise.
    	* libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise.
    	* libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE.
    	* libsupc++/exception_ptr.h: Likewise.
    	* libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro.
    	* libsupc++/nested_exception.cc: Remove check for
    	ATOMIC_INT_LOCK_FREE.
    	* libsupc++/nested_exception.h: Likewise.
    	* src/c++11/future.cc: Likewise.
    	* testsuite/18_support/exception_ptr/*: Remove atomic builtins checks.
    	* testsuite/18_support/nested_exception/*: Likewise.
    	* testsuite/30_threads/async/*: Likewise.
    	* testsuite/30_threads/future/*: Likewise.
    	* testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
    	* testsuite/30_threads/packaged_task/*: Likewise.
    	* testsuite/30_threads/promise/*: Likewise.
    	* testsuite/30_threads/shared_future/*: Likewise.

diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future
index 8ba1306..b83d74b 100644
--- a/libstdc++-v3/include/std/future
+++ b/libstdc++-v3/include/std/future
@@ -192,8 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     future<__async_result_of<_Fn, _Args...>>
     async(_Fn&& __fn, _Args&&... __args);
 
-#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
-  && (ATOMIC_INT_LOCK_FREE > 1)
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
 
   /// Base class and enclosing scope.
   struct __future_base
@@ -1751,7 +1750,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #endif // _GLIBCXX_ASYNC_ABI_COMPAT
 #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
-       // && ATOMIC_INT_LOCK_FREE
 
   // @} group futures
 _GLIBCXX_END_NAMESPACE_VERSION
diff --git a/libstdc++-v3/libsupc++/eh_atomics.h b/libstdc++-v3/libsupc++/eh_atomics.h
new file mode 100644
index 0000000..71b42a4
--- /dev/null
+++ b/libstdc++-v3/libsupc++/eh_atomics.h
@@ -0,0 +1,84 @@
+// Exception Handling support header for -*- C++ -*-
+
+// Copyright (C) 2016 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file eh_atomics.h
+ *  This is an internal header file, included by library source files.
+ *  Do not attempt to use it directly.
+ */
+
+#ifndef _EH_ATOMICS_H
+#define _EH_ATOMICS_H 1
+
+#include <bits/c++config.h>
+#include <bits/atomic_word.h>
+#include <bits/atomic_lockfree_defines.h>
+#if ATOMIC_INT_LOCK_FREE <= 1
+# include <ext/atomicity.h>
+#endif
+
+#pragma GCC visibility push(default)
+extern "C++" {
+namespace __gnu_cxx
+{
+  void
+  __eh_atomic_inc (_Atomic_word* __count) __attribute__((always_inline));
+
+  bool
+  __eh_atomic_dec (_Atomic_word* __count) __attribute__((always_inline));
+
+  // Increments the count.
+  inline void
+  __eh_atomic_inc (_Atomic_word* __count)
+  {
+#if ATOMIC_INT_LOCK_FREE > 1
+    __atomic_add_fetch (__count, 1, __ATOMIC_ACQ_REL);
+#else
+    _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE (__count);
+    __gnu_cxx::__atomic_add_dispatch (__count, 1);
+    _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER (__count);
+#endif
+  }
+
+  // Decrements the count and returns true if it reached zero.
+  inline bool
+  __eh_atomic_dec (_Atomic_word* __count)
+  {
+#if ATOMIC_INT_LOCK_FREE > 1
+    return __atomic_sub_fetch (__count, 1, __ATOMIC_ACQ_REL) == 0;
+#else
+    _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE (__count);
+    if (__gnu_cxx::__exchange_and_add_dispatch (__count, -1) == 1)
+      {
+	_GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER (__count);
+	return true;
+      }
+    return false;
+#endif
+  }
+} // namespace __gnu_cxx
+}
+#pragma GCC visibility pop
+
+#endif // _EH_ATOMICS_H
diff --git a/libstdc++-v3/libsupc++/eh_ptr.cc b/libstdc++-v3/libsupc++/eh_ptr.cc
index f3c910b..33e3a21 100644
--- a/libstdc++-v3/libsupc++/eh_ptr.cc
+++ b/libstdc++-v3/libsupc++/eh_ptr.cc
@@ -23,9 +23,7 @@
 // <http://www.gnu.org/licenses/>.
 
 #include <bits/c++config.h>
-#include <bits/atomic_lockfree_defines.h>
-
-#if ATOMIC_INT_LOCK_FREE > 1
+#include "eh_atomics.h"
 
 #define _GLIBCXX_EH_PTR_COMPAT
 
@@ -101,7 +99,7 @@ std::__exception_ptr::exception_ptr::_M_addref() noexcept
     {
       __cxa_refcounted_exception *eh =
 	__get_refcounted_exception_header_from_obj (_M_exception_object);
-      __atomic_add_fetch (&eh->referenceCount, 1, __ATOMIC_ACQ_REL);
+      __gnu_cxx::__eh_atomic_inc (&eh->referenceCount);
     }
 }
 
@@ -113,7 +111,7 @@ std::__exception_ptr::exception_ptr::_M_release() noexcept
     {
       __cxa_refcounted_exception *eh =
 	__get_refcounted_exception_header_from_obj (_M_exception_object);
-      if (__atomic_sub_fetch (&eh->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
+      if (__gnu_cxx::__eh_atomic_dec (&eh->referenceCount))
         {
 	  if (eh->exc.exceptionDestructor)
 	    eh->exc.exceptionDestructor (_M_exception_object);
@@ -211,7 +209,7 @@ __gxx_dependent_exception_cleanup(_Unwind_Reason_Code code,
 
   __cxa_free_dependent_exception (dep);
 
-  if (__atomic_sub_fetch (&header->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
+  if (__gnu_cxx::__eh_atomic_dec (&header->referenceCount))
     {
       if (header->exc.exceptionDestructor)
 	header->exc.exceptionDestructor (header + 1);
@@ -230,7 +228,7 @@ std::rethrow_exception(std::exception_ptr ep)
 
   __cxa_dependent_exception *dep = __cxa_allocate_dependent_exception ();
   dep->primaryException = obj;
-  __atomic_add_fetch (&eh->referenceCount, 1,  __ATOMIC_ACQ_REL);
+  __gnu_cxx::__eh_atomic_inc (&eh->referenceCount);
 
   dep->unexpectedHandler = get_unexpected ();
   dep->terminateHandler = get_terminate ();
@@ -252,5 +250,3 @@ std::rethrow_exception(std::exception_ptr ep)
 }
 
 #undef _GLIBCXX_EH_PTR_COMPAT
-
-#endif
diff --git a/libstdc++-v3/libsupc++/eh_throw.cc b/libstdc++-v3/libsupc++/eh_throw.cc
index a05f4eb..0174a93 100644
--- a/libstdc++-v3/libsupc++/eh_throw.cc
+++ b/libstdc++-v3/libsupc++/eh_throw.cc
@@ -24,6 +24,7 @@
 
 #include <bits/c++config.h>
 #include "unwind-cxx.h"
+#include "eh_atomics.h"
 
 using namespace __cxxabiv1;
 
@@ -42,17 +43,13 @@ __gxx_exception_cleanup (_Unwind_Reason_Code code, _Unwind_Exception *exc)
   if (code != _URC_FOREIGN_EXCEPTION_CAUGHT && code != _URC_NO_REASON)
     __terminate (header->exc.terminateHandler);
 
-#if ATOMIC_INT_LOCK_FREE > 1
-  if (__atomic_sub_fetch (&header->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
+  if (__gnu_cxx::__eh_atomic_dec (&header->referenceCount))
     {
-#endif
       if (header->exc.exceptionDestructor)
 	header->exc.exceptionDestructor (header + 1);
 
       __cxa_free_exception (header + 1);
-#if ATOMIC_INT_LOCK_FREE > 1
     }
-#endif
 }
 
 extern "C" __cxa_refcounted_exception*
diff --git a/libstdc++-v3/libsupc++/eh_tm.cc b/libstdc++-v3/libsupc++/eh_tm.cc
index c05f611..85ae46c 100644
--- a/libstdc++-v3/libsupc++/eh_tm.cc
+++ b/libstdc++-v3/libsupc++/eh_tm.cc
@@ -24,6 +24,7 @@
 
 #include <cstdlib>
 #include "unwind-cxx.h"
+#include "eh_atomics.h"
 
 using namespace __cxxabiv1;
 
@@ -45,9 +46,7 @@ free_any_cxa_exception (_Unwind_Exception *eo)
       __cxa_free_dependent_exception (dep);
     }
 
-#if __GCC_ATOMIC_INT_LOCK_FREE > 1
-  if (__atomic_sub_fetch (&h->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
-#endif
+  if (__gnu_cxx::__eh_atomic_dec (&h->referenceCount))
     __cxa_free_exception (h + 1);
 }
 
diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception
index 8be903b..021d70e 100644
--- a/libstdc++-v3/libsupc++/exception
+++ b/libstdc++-v3/libsupc++/exception
@@ -35,7 +35,6 @@
 #pragma GCC visibility push(default)
 
 #include <bits/c++config.h>
-#include <bits/atomic_lockfree_defines.h>
 #include <bits/exception.h>
 
 extern "C++" {
@@ -139,7 +138,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
 
 #pragma GCC visibility pop
 
-#if (__cplusplus >= 201103L) && (ATOMIC_INT_LOCK_FREE > 1)
+#if (__cplusplus >= 201103L)
 #include <bits/exception_ptr.h>
 #include <bits/nested_exception.h>
 #endif
diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h
index a47a585..cce156a 100644
--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -39,10 +39,6 @@
 #include <typeinfo>
 #include <new>
 
-#if ATOMIC_INT_LOCK_FREE < 2
-#  error This platform does not support exception propagation.
-#endif
-
 extern "C++" {
 
 namespace std 
diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
index 9b61799..66edffb 100644
--- a/libstdc++-v3/libsupc++/guard.cc
+++ b/libstdc++-v3/libsupc++/guard.cc
@@ -30,6 +30,7 @@
 #include <new>
 #include <ext/atomicity.h>
 #include <ext/concurrence.h>
+#include <bits/atomic_lockfree_defines.h>
 #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
   && (ATOMIC_INT_LOCK_FREE > 1) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
 # include <climits>
diff --git a/libstdc++-v3/libsupc++/nested_exception.cc b/libstdc++-v3/libsupc++/nested_exception.cc
index c1a7b7a..82dddb1 100644
--- a/libstdc++-v3/libsupc++/nested_exception.cc
+++ b/libstdc++-v3/libsupc++/nested_exception.cc
@@ -25,7 +25,5 @@
 
 namespace std 
 {
-#if ATOMIC_INT_LOCK_FREE > 1
   nested_exception::~nested_exception() noexcept = default;
-#endif
 } // namespace std
diff --git a/libstdc++-v3/libsupc++/nested_exception.h b/libstdc++-v3/libsupc++/nested_exception.h
index 078af0e..48bdabb 100644
--- a/libstdc++-v3/libsupc++/nested_exception.h
+++ b/libstdc++-v3/libsupc++/nested_exception.h
@@ -39,10 +39,6 @@
 #include <bits/c++config.h>
 #include <bits/move.h>
 
-#if ATOMIC_INT_LOCK_FREE < 2
-#  error This platform does not support exception propagation.
-#endif
-
 extern "C++" {
 
 namespace std
diff --git a/libstdc++-v3/src/c++11/future.cc b/libstdc++-v3/src/c++11/future.cc
index 7809a37..a14051a 100644
--- a/libstdc++-v3/src/c++11/future.cc
+++ b/libstdc++-v3/src/c++11/future.cc
@@ -78,8 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   const char*
   future_error::what() const noexcept { return logic_error::what(); }
 
-#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
-  && (ATOMIC_INT_LOCK_FREE > 1)
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
   __future_base::_Result_base::_Result_base() = default;
 
   __future_base::_Result_base::~_Result_base() = default;
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
index 74307cc..a6659b8 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
index c00e287..d58f32d 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
index 2b5ec2d..cfaea5d4 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
index c83d5fb..5c15b48 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2015-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
index c1e9a05..7dbf3d6 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
@@ -17,7 +17,6 @@
 
 // { dg-options "-fno-exceptions -O0" }
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 #include <exception>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
index 79459eb..38decc1 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // 2008-05-25  Sebastian Redl  <sebastian.redl@getdesigned.at>
 
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
index ada652e..8343b49 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // 2008-05-25  Sebastian Redl  <sebastian.redl@getdesigned.at>
 
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
index b9ded35..c35525e 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
index 3787777..ad0333b 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
index 6318bc4..80c6e3e 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
index b3b9e0c..5f5f054 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
index b80d688..95ec8ab 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
index 567af32..7f2ab93 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // 2008-05-25  Sebastian Redl  <sebastian.redl@getdesigned.at>
 
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc b/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
index 04ef32f..34728043 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc b/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
index f1884a5..124e4d1 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc b/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
index bf803db..4164e91 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2015-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc b/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
index af6f90c..a1141b7 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc b/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
index 467d371..c9092bd 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
index b042084..62dd26a 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
index fd374e5..c18f6f0 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
index f768b1e..3036328 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/42819.cc b/libstdc++-v3/testsuite/30_threads/async/42819.cc
index b836877..44cb674 100644
--- a/libstdc++-v3/testsuite/30_threads/async/42819.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/42819.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/49668.cc b/libstdc++-v3/testsuite/30_threads/async/49668.cc
index fe597c0..074d9b0 100644
--- a/libstdc++-v3/testsuite/30_threads/async/49668.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/49668.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/54297.cc b/libstdc++-v3/testsuite/30_threads/async/54297.cc
index 756fd97..ed9230d 100644
--- a/libstdc++-v3/testsuite/30_threads/async/54297.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/54297.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 // { dg-require-sleep "" }
 
 // Copyright (C) 2012-2016 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/async/any.cc b/libstdc++-v3/testsuite/30_threads/async/any.cc
index a78b0e5..03c6401 100644
--- a/libstdc++-v3/testsuite/30_threads/async/any.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/any.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/async.cc b/libstdc++-v3/testsuite/30_threads/async/async.cc
index 02c497c..3de9ef6 100644
--- a/libstdc++-v3/testsuite/30_threads/async/async.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/async.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/except.cc b/libstdc++-v3/testsuite/30_threads/async/except.cc
index 1a63680..0d94916 100644
--- a/libstdc++-v3/testsuite/30_threads/async/except.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/except.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc b/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
index b344b74..c44fd29 100644
--- a/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/launch.cc b/libstdc++-v3/testsuite/30_threads/async/launch.cc
index 7064c91..6ea6834 100644
--- a/libstdc++-v3/testsuite/30_threads/async/launch.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/launch.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc b/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
index 62fbf27..3a631e9 100644
--- a/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
@@ -20,7 +20,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // LWG 2021. Further incorrect usages of result_of
 // Arguments to result_of should use decay.
diff --git a/libstdc++-v3/testsuite/30_threads/async/sync.cc b/libstdc++-v3/testsuite/30_threads/async/sync.cc
index b4d47597..7fa11c8 100644
--- a/libstdc++-v3/testsuite/30_threads/async/sync.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/sync.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
index a36dafb..467e7f0 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc b/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
index dcafe3e..b61ca13 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
@@ -2,7 +2,6 @@
 // { dg-options "-fno-inline -g0" }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 // { dg-final { scan-assembler-not "_ZNSt6futureIvEC2Ev" } }
 // { dg-final { scan-assembler-not "_ZNSt6futureIiEC2Ev" } }
 
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
index 8fc5de6..f53056d 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/default.cc b/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
index b9424be..13c6e01 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/move.cc b/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
index 63b017f..33d0b60 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
index 50971f3..910fe8e 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/45133.cc b/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
index 1f91483..e5d63bd 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/get.cc b/libstdc++-v3/testsuite/30_threads/future/members/get.cc
index b99837e..849c94a 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/get.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/get.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/get2.cc b/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
index 6a259e7..60bcb42 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/share.cc b/libstdc++-v3/testsuite/30_threads/future/members/share.cc
index cb163e2..1933725 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/share.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/share.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/valid.cc b/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
index e473dc1..5993a97 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
index 6d08243..6553890 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
index 1b8707d..457de4d 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
index ed71c50..0b54b8a 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
index 87d423f..592f03b 100644
--- a/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc b/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
index 3f9d273..c8f4e53 100644
--- a/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
+++ b/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" } 
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
index 1ab9d19..cb74ab8 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
index f2f4ce9..d5c940b 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
index ce8d6c1..2297d7dc 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
index f267192..655aa40 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
index 6903778..97d7d86 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
index 718608e..b96ceb0 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2013-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
index c0830e3..7b7099d 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
index ebfc00a..726f50a 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
index e67f9fd..96f6631 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
index 1c88262..4b9cbb5 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
index 7f1156f..05de5c6 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
index 1fa2d77..f654647 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
index 2ee5018..377b29f 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
index 9059542..3c621d1 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target *-*-linux* *-*-gnu* } }
 // { dg-options "-pthread" { target *-*-linux* *-*-gnu* *-*-solaris* } }
 // { dg-require-effective-target c++11 }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
index 72d1e66..5f0c7cd 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
index 85bbf5b..c7de321 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
index 0ffd746..7b9d259 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
index fe4778a..5e09ef7 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
index 27662d9..7790729 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
index c3f5cec..411dd87 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
index fb95c00..0fa2d09 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
index 61fcb4a..fc7a33d 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
index 1581b54..6aabe0d 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
index 7581e36..dcdff24 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
index fa50b1d..466dfaa 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
index 9b26152..1ee8c27 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
index e3b61e4..05a8518 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
index 1e2e9e0..fcee8c5 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/60966.cc b/libstdc++-v3/testsuite/30_threads/promise/60966.cc
index 4030ff8..238dae5 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/60966.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/60966.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/69106.cc b/libstdc++-v3/testsuite/30_threads/promise/69106.cc
index 322a2f4..7201a94 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/69106.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/69106.cc
@@ -18,7 +18,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 #include <future>
 
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
index 2ca2a9e..54d1bda 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
index d23ee29..5012026 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
index e7567af..eb51229 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
index bdac11e..30d1be4 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
index 4cbef6d..caa59a5 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
index e66d047..f33673b 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
index 5518840..93a97d1 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
index 61ba488..2ec4c63 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc b/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
index 5e8d9f3..3f1a40b 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc b/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
index 209f545..0a2601d 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
index 931da71..c5c14da 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
index 3672d18..cb3d003 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
index e15d912..de725ef 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
index e3b7301..999ee31 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
index bb26948..f63c847 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
index 1fa9d53..03c9aa2 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc b/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
index b445d74..d718db9 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
index 4a220a9..6b73bd9 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc b/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
index e19a891..9d10067 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
index 572c658..c8b0532 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
index d0a5fe2..98b5098 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
@@ -2,7 +2,6 @@
 // { dg-options "-fno-inline -g0" }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 // { dg-final { scan-assembler-not "_ZNSt13shared_futureIvEC2Ev" } }
 // { dg-final { scan-assembler-not "_ZNSt13shared_futureIiEC2Ev" } }
 
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
index 4628858..40eed23 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
index ba96ab3..567b2ec 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
index 3d2666c..0484053 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
index ae20b01..a6debee 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
index 4548fcc..6b2bc3c 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
index efb84df..f9447f6 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
index 20db446..3a237d7 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
index 747456c..5238821 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
index bf925f1..52058c8 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
index 714c4d2..d38fe07 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
index e99979a..2f70874 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
index 715b7fe..49fc122 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libstdc++: Allow using <future> without lock free atomic int
  2016-12-16 17:56 ` Jonathan Wakely
@ 2016-12-19 17:58   ` Jonathan Wakely
  2017-01-03 15:32     ` Jonathan Wakely
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Wakely @ 2016-12-19 17:58 UTC (permalink / raw)
  To: Pauli; +Cc: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 2929 bytes --]

On 16/12/16 17:52 +0000, Jonathan Wakely wrote:
>On 09/11/16 23:26 +0200, Pauli wrote:
>>Compiling programs using std::future for old arm processors fails. The
>>problem is caused by preprocessor check for atomic lock free int.
>>
>>Future can be changed to work correctly without lock free atomics with
>>minor changes to exception_ptr implementation.
>>
>>Without lock free atomics there is question if deadlock can happen. But
>>atomic operations can't call outside code preventing any ABBA or
>>recursive mutex acquiring deadlocks.
>>Deadlock could happen if throwing an exception or access
>>is_lock_free() == false atomic from asynchronous signal handler.
>>Throwing from signal handler is undefined behavior. I don't know about
>>accessing atomics from asynchronous signal handler but that feels like
>>undefined behavior if is_lock_free returns false.
>>
>>Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
>>
>>differences to current if atomic builtins available:
>>* Race detector annotations that are empty by default
>>* Check for __gthread_active_p
>>* Generate x86 code uses xadd instead of xsub
>>This makes code a bit worse. But problem is duplicated to any other user
>>of __exchange_and_add. The internal API implementation should be fixed
>>to generate better code for all cases. But that is a follow up patch.
>
>I'd prefer to do it so we don't change anything for the targets that
>already work. Your follow-up patch missed the deadline for GCC 7 and
>so will have to wait for GCC 8 now, and we don't want to pessimize
>x86.
>
>Also, I think your patch actually breaks some GNU/Linux targets,
>because you removed the <atomic_lockfree_defines.h> header from
><exception>, which means that in libsupc++/guard.cc the macro
>ATOMIC_INT_LOCK_FREE is no longer defined, and so _GLIBCXX_USE_FUTEX
>doesn't get defined. Now arguably guard.cc should have been including
>the header directly, but it still shows why such an invasive patch is
>a bad idea at this stage of the GCC 7 process.
>
>The attached patch attempts to make exception propagation work for all
>targets, without changing anything if it already works.
>
>Do you see any problems with this alternative approach?
>Could you please test it for armv5te?
>
>It passes all tests for x86_64-linux and ppc64le-linux.
>
>For your follow-up patch, do you already have a copyright assignment
>for contributions to GCC? We'll probably need that before it can be
>accepted. We don't need one for this patch, because what remains of
>your original patch is just the testsuite changes, which are
>mechanical and not copyrightable.

We also need to adjust the linker script to avoid adding new exports
to old symbol versions, revised patch attached. I think it would be
better to make configure define a macro like
HAVE_EXCEPTION_PTR_SINCE_GCC6 and use that in the linker script
instead of testing __GCC_ATOMIC_INT_LOCK_FREE directly. I'll work on
that.





[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 72956 bytes --]

commit a19855aecf301a30bb1d6f6c39fe2a458baddd48
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Dec 16 15:22:21 2016 +0000

    PR64735 support exception propagation without atomics
    
    2016-12-19  Pauli Nieminen  <suokkos@gmail.com>
    	    Jonathan Wakely  <jwakely@redhat.com>
    
    	PR libstdc++/64735
    	* config/abi/pre/gnu.ver [__GCC_ATOMIC_INT_LOCK_FREE > 1]
    	(GLIBCXX_3.4.15, GLIBCXX_3.4.21, CXXABI_1.3.3, CXXABI_1.3.5): Make
    	exports for exception_ptr, nested_exception, and future conditional.
    	[__GCC_ATOMIC_INT_LOCK_FREE <= 1] (GLIBCXX_3.4.23, CXXABI_1.3.11): Add
    	exports for exception_ptr, nested_exception, and future conditional.
    	* include/std/future: Remove check for ATOMIC_INT_LOCK_FREE
    	* libsupc++/eh_atomics.h: New file for internal use only.
    	(__eh_atomic_inc, __eh_atomic_dec): New.
    	* libsupc++/eh_ptr.cc (exception_ptr::_M_addref)
    	(exception_ptr::_M_release) (__gxx_dependent_exception_cleanup)
    	(rethrow_exception): Use eh_atomics.h reference counting helpers.
    	* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise.
    	* libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise.
    	* libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE.
    	* libsupc++/exception_ptr.h: Likewise.
    	* libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro.
    	* libsupc++/nested_exception.cc: Remove check for
    	ATOMIC_INT_LOCK_FREE.
    	* libsupc++/nested_exception.h: Likewise.
    	* src/c++11/future.cc: Likewise.
    	* testsuite/18_support/exception_ptr/*: Remove atomic builtins checks.
    	* testsuite/18_support/nested_exception/*: Likewise.
    	* testsuite/30_threads/async/*: Likewise.
    	* testsuite/30_threads/future/*: Likewise.
    	* testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
    	* testsuite/30_threads/packaged_task/*: Likewise.
    	* testsuite/30_threads/promise/*: Likewise.
    	* testsuite/30_threads/shared_future/*: Likewise.

diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index 8b0f67b..5da698e 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -1503,6 +1503,9 @@ GLIBCXX_3.4.15 {
     _ZNSt14error_categoryC*;
     _ZNSt14error_categoryD*;
 
+#if __GCC_ATOMIC_INT_LOCK_FREE > 1
+    # std::future symbols are only present in this version when
+    # atomic operations on int are always lock-free.
     _ZNSt13__future_base12_Result_baseC*;
     _ZNSt13__future_base12_Result_baseD*;
     _ZTINSt13__future_base12_Result_baseE;
@@ -1511,6 +1514,7 @@ GLIBCXX_3.4.15 {
     _ZNSt13__future_base11_State_baseD*;
     _ZTINSt13__future_base11_State_baseE;
     _ZTVNSt13__future_base11_State_baseE;
+#endif
 
 } GLIBCXX_3.4.14;
 
@@ -1687,8 +1691,10 @@ GLIBCXX_3.4.21 {
 
     # std::notify_all_at_thread_exit
     _ZSt25notify_all_at_thread_exitRSt18condition_variableSt11unique_lockISt5mutexE;
+#if __GCC_ATOMIC_INT_LOCK_FREE > 1
     # std::__future_base::_State_baseV2::_Make_ready::_M_set()
     _ZNSt13__future_base13_State_baseV211_Make_ready6_M_setEv;
+#endif
 
     # ABI-tagged std::basic_string
     _ZNSt7__cxx1112basic_stringI[cw]St11char_traitsI[cw]ESaI[cw]EE1[01]**;
@@ -1947,6 +1953,16 @@ GLIBCXX_3.4.23 {
     _ZNSsC[12]ERKSs[jmy]RKSaIcE;
     _ZNSbIwSt11char_traitsIwESaIwEEC[12]ERKS2_mRKS1_;
 
+#if __GCC_ATOMIC_INT_LOCK_FREE <= 1
+    # std::future symbols were first exported for this version
+    # when atomic operations on int are not always lock-free.
+    _ZNSt13__future_base12_Result_baseC*;
+    _ZNSt13__future_base12_Result_baseD*;
+    _ZTINSt13__future_base12_Result_baseE;
+    _ZTVNSt13__future_base12_Result_baseE;
+    _ZNSt13__future_base13_State_baseV211_Make_ready6_M_setEv;
+#endif
+
 } GLIBCXX_3.4.22;
 
 # Symbols in the support library (libsupc++) have their own tag.
@@ -2080,6 +2096,7 @@ CXXABI_1.3.3 {
     _ZTIPDi;
     _ZTIPKDi;
 
+#if __GCC_ATOMIC_INT_LOCK_FREE > 1
     # exception_ptr
     _ZNSt15__exception_ptr13exception_ptrC1Ev;
     _ZNSt15__exception_ptr13exception_ptrC2Ev;
@@ -2099,6 +2116,7 @@ CXXABI_1.3.3 {
 
     _ZSt17current_exceptionv;
     _ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE;
+#endif
 
 } CXXABI_1.3.2;
 
@@ -2129,10 +2147,12 @@ CXXABI_1.3.5 {
     # FNV hash.
     _ZSt15_Fnv_hash_bytesPKv*;
 
+#if __GCC_ATOMIC_INT_LOCK_FREE > 1
     # std::nested_exception
     _ZNSt16nested_exceptionD*;
     _ZTISt16nested_exception;
     _ZTVSt16nested_exception;
+#endif
 
 } CXXABI_1.3.4;
 
@@ -2209,6 +2229,33 @@ CXXABI_1.3.11 {
     _ZdaPvSt11align_val_tRKSt9nothrow_t;
     _ZdaPv[jmy]St11align_val_t;
 
+#if __GCC_ATOMIC_INT_LOCK_FREE <= 1
+    # exception_ptr
+    _ZNSt15__exception_ptr13exception_ptrC1Ev;
+    _ZNSt15__exception_ptr13exception_ptrC2Ev;
+    _ZNSt15__exception_ptr13exception_ptrC1ERKS0_;
+    _ZNSt15__exception_ptr13exception_ptrC2ERKS0_;
+    _ZNSt15__exception_ptr13exception_ptrC1EMS0_FvvE;
+    _ZNSt15__exception_ptr13exception_ptrC2EMS0_FvvE;
+    _ZNSt15__exception_ptr13exception_ptrD1Ev;
+    _ZNSt15__exception_ptr13exception_ptrD2Ev;
+    _ZNSt15__exception_ptr13exception_ptraSERKS0_;
+    _ZNKSt15__exception_ptr13exception_ptrcvMS0_FvvEEv;
+    _ZNKSt15__exception_ptr13exception_ptrntEv;
+    _ZNKSt15__exception_ptr13exception_ptr20__cxa_exception_typeEv;
+    _ZNSt15__exception_ptr13exception_ptr4swapERS0_;
+    _ZNSt15__exception_ptreqERKNS_13exception_ptrES2_;
+    _ZNSt15__exception_ptrneERKNS_13exception_ptrES2_;
+
+    _ZSt17current_exceptionv;
+    _ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE;
+
+    # std::nested_exception
+    _ZNSt16nested_exceptionD*;
+    _ZTISt16nested_exception;
+    _ZTVSt16nested_exception;
+#endif
+
 } CXXABI_1.3.10;
 
 # Symbols in the support library (libsupc++) supporting transactional memory.
diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future
index 8ba1306..b83d74b 100644
--- a/libstdc++-v3/include/std/future
+++ b/libstdc++-v3/include/std/future
@@ -192,8 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     future<__async_result_of<_Fn, _Args...>>
     async(_Fn&& __fn, _Args&&... __args);
 
-#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
-  && (ATOMIC_INT_LOCK_FREE > 1)
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
 
   /// Base class and enclosing scope.
   struct __future_base
@@ -1751,7 +1750,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #endif // _GLIBCXX_ASYNC_ABI_COMPAT
 #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
-       // && ATOMIC_INT_LOCK_FREE
 
   // @} group futures
 _GLIBCXX_END_NAMESPACE_VERSION
diff --git a/libstdc++-v3/libsupc++/eh_atomics.h b/libstdc++-v3/libsupc++/eh_atomics.h
new file mode 100644
index 0000000..71b42a4
--- /dev/null
+++ b/libstdc++-v3/libsupc++/eh_atomics.h
@@ -0,0 +1,84 @@
+// Exception Handling support header for -*- C++ -*-
+
+// Copyright (C) 2016 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file eh_atomics.h
+ *  This is an internal header file, included by library source files.
+ *  Do not attempt to use it directly.
+ */
+
+#ifndef _EH_ATOMICS_H
+#define _EH_ATOMICS_H 1
+
+#include <bits/c++config.h>
+#include <bits/atomic_word.h>
+#include <bits/atomic_lockfree_defines.h>
+#if ATOMIC_INT_LOCK_FREE <= 1
+# include <ext/atomicity.h>
+#endif
+
+#pragma GCC visibility push(default)
+extern "C++" {
+namespace __gnu_cxx
+{
+  void
+  __eh_atomic_inc (_Atomic_word* __count) __attribute__((always_inline));
+
+  bool
+  __eh_atomic_dec (_Atomic_word* __count) __attribute__((always_inline));
+
+  // Increments the count.
+  inline void
+  __eh_atomic_inc (_Atomic_word* __count)
+  {
+#if ATOMIC_INT_LOCK_FREE > 1
+    __atomic_add_fetch (__count, 1, __ATOMIC_ACQ_REL);
+#else
+    _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE (__count);
+    __gnu_cxx::__atomic_add_dispatch (__count, 1);
+    _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER (__count);
+#endif
+  }
+
+  // Decrements the count and returns true if it reached zero.
+  inline bool
+  __eh_atomic_dec (_Atomic_word* __count)
+  {
+#if ATOMIC_INT_LOCK_FREE > 1
+    return __atomic_sub_fetch (__count, 1, __ATOMIC_ACQ_REL) == 0;
+#else
+    _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE (__count);
+    if (__gnu_cxx::__exchange_and_add_dispatch (__count, -1) == 1)
+      {
+	_GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER (__count);
+	return true;
+      }
+    return false;
+#endif
+  }
+} // namespace __gnu_cxx
+}
+#pragma GCC visibility pop
+
+#endif // _EH_ATOMICS_H
diff --git a/libstdc++-v3/libsupc++/eh_ptr.cc b/libstdc++-v3/libsupc++/eh_ptr.cc
index f3c910b..33e3a21 100644
--- a/libstdc++-v3/libsupc++/eh_ptr.cc
+++ b/libstdc++-v3/libsupc++/eh_ptr.cc
@@ -23,9 +23,7 @@
 // <http://www.gnu.org/licenses/>.
 
 #include <bits/c++config.h>
-#include <bits/atomic_lockfree_defines.h>
-
-#if ATOMIC_INT_LOCK_FREE > 1
+#include "eh_atomics.h"
 
 #define _GLIBCXX_EH_PTR_COMPAT
 
@@ -101,7 +99,7 @@ std::__exception_ptr::exception_ptr::_M_addref() noexcept
     {
       __cxa_refcounted_exception *eh =
 	__get_refcounted_exception_header_from_obj (_M_exception_object);
-      __atomic_add_fetch (&eh->referenceCount, 1, __ATOMIC_ACQ_REL);
+      __gnu_cxx::__eh_atomic_inc (&eh->referenceCount);
     }
 }
 
@@ -113,7 +111,7 @@ std::__exception_ptr::exception_ptr::_M_release() noexcept
     {
       __cxa_refcounted_exception *eh =
 	__get_refcounted_exception_header_from_obj (_M_exception_object);
-      if (__atomic_sub_fetch (&eh->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
+      if (__gnu_cxx::__eh_atomic_dec (&eh->referenceCount))
         {
 	  if (eh->exc.exceptionDestructor)
 	    eh->exc.exceptionDestructor (_M_exception_object);
@@ -211,7 +209,7 @@ __gxx_dependent_exception_cleanup(_Unwind_Reason_Code code,
 
   __cxa_free_dependent_exception (dep);
 
-  if (__atomic_sub_fetch (&header->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
+  if (__gnu_cxx::__eh_atomic_dec (&header->referenceCount))
     {
       if (header->exc.exceptionDestructor)
 	header->exc.exceptionDestructor (header + 1);
@@ -230,7 +228,7 @@ std::rethrow_exception(std::exception_ptr ep)
 
   __cxa_dependent_exception *dep = __cxa_allocate_dependent_exception ();
   dep->primaryException = obj;
-  __atomic_add_fetch (&eh->referenceCount, 1,  __ATOMIC_ACQ_REL);
+  __gnu_cxx::__eh_atomic_inc (&eh->referenceCount);
 
   dep->unexpectedHandler = get_unexpected ();
   dep->terminateHandler = get_terminate ();
@@ -252,5 +250,3 @@ std::rethrow_exception(std::exception_ptr ep)
 }
 
 #undef _GLIBCXX_EH_PTR_COMPAT
-
-#endif
diff --git a/libstdc++-v3/libsupc++/eh_throw.cc b/libstdc++-v3/libsupc++/eh_throw.cc
index a05f4eb..0174a93 100644
--- a/libstdc++-v3/libsupc++/eh_throw.cc
+++ b/libstdc++-v3/libsupc++/eh_throw.cc
@@ -24,6 +24,7 @@
 
 #include <bits/c++config.h>
 #include "unwind-cxx.h"
+#include "eh_atomics.h"
 
 using namespace __cxxabiv1;
 
@@ -42,17 +43,13 @@ __gxx_exception_cleanup (_Unwind_Reason_Code code, _Unwind_Exception *exc)
   if (code != _URC_FOREIGN_EXCEPTION_CAUGHT && code != _URC_NO_REASON)
     __terminate (header->exc.terminateHandler);
 
-#if ATOMIC_INT_LOCK_FREE > 1
-  if (__atomic_sub_fetch (&header->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
+  if (__gnu_cxx::__eh_atomic_dec (&header->referenceCount))
     {
-#endif
       if (header->exc.exceptionDestructor)
 	header->exc.exceptionDestructor (header + 1);
 
       __cxa_free_exception (header + 1);
-#if ATOMIC_INT_LOCK_FREE > 1
     }
-#endif
 }
 
 extern "C" __cxa_refcounted_exception*
diff --git a/libstdc++-v3/libsupc++/eh_tm.cc b/libstdc++-v3/libsupc++/eh_tm.cc
index c05f611..85ae46c 100644
--- a/libstdc++-v3/libsupc++/eh_tm.cc
+++ b/libstdc++-v3/libsupc++/eh_tm.cc
@@ -24,6 +24,7 @@
 
 #include <cstdlib>
 #include "unwind-cxx.h"
+#include "eh_atomics.h"
 
 using namespace __cxxabiv1;
 
@@ -45,9 +46,7 @@ free_any_cxa_exception (_Unwind_Exception *eo)
       __cxa_free_dependent_exception (dep);
     }
 
-#if __GCC_ATOMIC_INT_LOCK_FREE > 1
-  if (__atomic_sub_fetch (&h->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
-#endif
+  if (__gnu_cxx::__eh_atomic_dec (&h->referenceCount))
     __cxa_free_exception (h + 1);
 }
 
diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception
index 8be903b..021d70e 100644
--- a/libstdc++-v3/libsupc++/exception
+++ b/libstdc++-v3/libsupc++/exception
@@ -35,7 +35,6 @@
 #pragma GCC visibility push(default)
 
 #include <bits/c++config.h>
-#include <bits/atomic_lockfree_defines.h>
 #include <bits/exception.h>
 
 extern "C++" {
@@ -139,7 +138,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
 
 #pragma GCC visibility pop
 
-#if (__cplusplus >= 201103L) && (ATOMIC_INT_LOCK_FREE > 1)
+#if (__cplusplus >= 201103L)
 #include <bits/exception_ptr.h>
 #include <bits/nested_exception.h>
 #endif
diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h
index a47a585..cce156a 100644
--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -39,10 +39,6 @@
 #include <typeinfo>
 #include <new>
 
-#if ATOMIC_INT_LOCK_FREE < 2
-#  error This platform does not support exception propagation.
-#endif
-
 extern "C++" {
 
 namespace std 
diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
index 9b61799..66edffb 100644
--- a/libstdc++-v3/libsupc++/guard.cc
+++ b/libstdc++-v3/libsupc++/guard.cc
@@ -30,6 +30,7 @@
 #include <new>
 #include <ext/atomicity.h>
 #include <ext/concurrence.h>
+#include <bits/atomic_lockfree_defines.h>
 #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
   && (ATOMIC_INT_LOCK_FREE > 1) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
 # include <climits>
diff --git a/libstdc++-v3/libsupc++/nested_exception.cc b/libstdc++-v3/libsupc++/nested_exception.cc
index c1a7b7a..82dddb1 100644
--- a/libstdc++-v3/libsupc++/nested_exception.cc
+++ b/libstdc++-v3/libsupc++/nested_exception.cc
@@ -25,7 +25,5 @@
 
 namespace std 
 {
-#if ATOMIC_INT_LOCK_FREE > 1
   nested_exception::~nested_exception() noexcept = default;
-#endif
 } // namespace std
diff --git a/libstdc++-v3/libsupc++/nested_exception.h b/libstdc++-v3/libsupc++/nested_exception.h
index 078af0e..48bdabb 100644
--- a/libstdc++-v3/libsupc++/nested_exception.h
+++ b/libstdc++-v3/libsupc++/nested_exception.h
@@ -39,10 +39,6 @@
 #include <bits/c++config.h>
 #include <bits/move.h>
 
-#if ATOMIC_INT_LOCK_FREE < 2
-#  error This platform does not support exception propagation.
-#endif
-
 extern "C++" {
 
 namespace std
diff --git a/libstdc++-v3/src/c++11/future.cc b/libstdc++-v3/src/c++11/future.cc
index 7809a37..a14051a 100644
--- a/libstdc++-v3/src/c++11/future.cc
+++ b/libstdc++-v3/src/c++11/future.cc
@@ -78,8 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   const char*
   future_error::what() const noexcept { return logic_error::what(); }
 
-#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
-  && (ATOMIC_INT_LOCK_FREE > 1)
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
   __future_base::_Result_base::_Result_base() = default;
 
   __future_base::_Result_base::~_Result_base() = default;
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
index 74307cc..a6659b8 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
index c00e287..d58f32d 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
index 2b5ec2d..cfaea5d4 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
index c83d5fb..5c15b48 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2015-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
index c1e9a05..7dbf3d6 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
@@ -17,7 +17,6 @@
 
 // { dg-options "-fno-exceptions -O0" }
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 #include <exception>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
index 79459eb..38decc1 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // 2008-05-25  Sebastian Redl  <sebastian.redl@getdesigned.at>
 
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
index ada652e..8343b49 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // 2008-05-25  Sebastian Redl  <sebastian.redl@getdesigned.at>
 
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
index b9ded35..c35525e 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
index 3787777..ad0333b 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
index 6318bc4..80c6e3e 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
index b3b9e0c..5f5f054 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
index b80d688..95ec8ab 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
index 567af32..7f2ab93 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // 2008-05-25  Sebastian Redl  <sebastian.redl@getdesigned.at>
 
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc b/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
index 04ef32f..34728043 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc b/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
index f1884a5..124e4d1 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc b/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
index bf803db..4164e91 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2015-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc b/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
index af6f90c..a1141b7 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc b/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
index 467d371..c9092bd 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
index b042084..62dd26a 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
index fd374e5..c18f6f0 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
index f768b1e..3036328 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/42819.cc b/libstdc++-v3/testsuite/30_threads/async/42819.cc
index b836877..44cb674 100644
--- a/libstdc++-v3/testsuite/30_threads/async/42819.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/42819.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/49668.cc b/libstdc++-v3/testsuite/30_threads/async/49668.cc
index fe597c0..074d9b0 100644
--- a/libstdc++-v3/testsuite/30_threads/async/49668.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/49668.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/54297.cc b/libstdc++-v3/testsuite/30_threads/async/54297.cc
index 756fd97..ed9230d 100644
--- a/libstdc++-v3/testsuite/30_threads/async/54297.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/54297.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 // { dg-require-sleep "" }
 
 // Copyright (C) 2012-2016 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/async/any.cc b/libstdc++-v3/testsuite/30_threads/async/any.cc
index a78b0e5..03c6401 100644
--- a/libstdc++-v3/testsuite/30_threads/async/any.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/any.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/async.cc b/libstdc++-v3/testsuite/30_threads/async/async.cc
index 02c497c..3de9ef6 100644
--- a/libstdc++-v3/testsuite/30_threads/async/async.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/async.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/except.cc b/libstdc++-v3/testsuite/30_threads/async/except.cc
index 1a63680..0d94916 100644
--- a/libstdc++-v3/testsuite/30_threads/async/except.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/except.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc b/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
index b344b74..c44fd29 100644
--- a/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/launch.cc b/libstdc++-v3/testsuite/30_threads/async/launch.cc
index 7064c91..6ea6834 100644
--- a/libstdc++-v3/testsuite/30_threads/async/launch.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/launch.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc b/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
index 62fbf27..3a631e9 100644
--- a/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
@@ -20,7 +20,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // LWG 2021. Further incorrect usages of result_of
 // Arguments to result_of should use decay.
diff --git a/libstdc++-v3/testsuite/30_threads/async/sync.cc b/libstdc++-v3/testsuite/30_threads/async/sync.cc
index b4d47597..7fa11c8 100644
--- a/libstdc++-v3/testsuite/30_threads/async/sync.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/sync.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
index a36dafb..467e7f0 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc b/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
index dcafe3e..b61ca13 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
@@ -2,7 +2,6 @@
 // { dg-options "-fno-inline -g0" }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 // { dg-final { scan-assembler-not "_ZNSt6futureIvEC2Ev" } }
 // { dg-final { scan-assembler-not "_ZNSt6futureIiEC2Ev" } }
 
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
index 8fc5de6..f53056d 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/default.cc b/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
index b9424be..13c6e01 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/move.cc b/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
index 63b017f..33d0b60 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
index 50971f3..910fe8e 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/45133.cc b/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
index 1f91483..e5d63bd 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/get.cc b/libstdc++-v3/testsuite/30_threads/future/members/get.cc
index b99837e..849c94a 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/get.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/get.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/get2.cc b/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
index 6a259e7..60bcb42 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/share.cc b/libstdc++-v3/testsuite/30_threads/future/members/share.cc
index cb163e2..1933725 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/share.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/share.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/valid.cc b/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
index e473dc1..5993a97 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
index 6d08243..6553890 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
index 1b8707d..457de4d 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
index ed71c50..0b54b8a 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
index 87d423f..592f03b 100644
--- a/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc b/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
index 3f9d273..c8f4e53 100644
--- a/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
+++ b/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" } 
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
index 1ab9d19..cb74ab8 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
index f2f4ce9..d5c940b 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
index ce8d6c1..2297d7dc 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
index f267192..655aa40 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
index 6903778..97d7d86 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
index 718608e..b96ceb0 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2013-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
index c0830e3..7b7099d 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
index ebfc00a..726f50a 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
index e67f9fd..96f6631 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
index 1c88262..4b9cbb5 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
index 7f1156f..05de5c6 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
index 1fa2d77..f654647 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
index 2ee5018..377b29f 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
index 9059542..3c621d1 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target *-*-linux* *-*-gnu* } }
 // { dg-options "-pthread" { target *-*-linux* *-*-gnu* *-*-solaris* } }
 // { dg-require-effective-target c++11 }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
index 72d1e66..5f0c7cd 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
index 85bbf5b..c7de321 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
index 0ffd746..7b9d259 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
index fe4778a..5e09ef7 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
index 27662d9..7790729 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
index c3f5cec..411dd87 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
index fb95c00..0fa2d09 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
index 61fcb4a..fc7a33d 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
index 1581b54..6aabe0d 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
index 7581e36..dcdff24 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
index fa50b1d..466dfaa 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
index 9b26152..1ee8c27 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
index e3b61e4..05a8518 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
index 1e2e9e0..fcee8c5 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/60966.cc b/libstdc++-v3/testsuite/30_threads/promise/60966.cc
index 4030ff8..238dae5 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/60966.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/60966.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/69106.cc b/libstdc++-v3/testsuite/30_threads/promise/69106.cc
index 322a2f4..7201a94 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/69106.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/69106.cc
@@ -18,7 +18,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 #include <future>
 
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
index 2ca2a9e..54d1bda 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
index d23ee29..5012026 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
index e7567af..eb51229 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
index bdac11e..30d1be4 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
index 4cbef6d..caa59a5 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
index e66d047..f33673b 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
index 5518840..93a97d1 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
index 61ba488..2ec4c63 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc b/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
index 5e8d9f3..3f1a40b 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc b/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
index 209f545..0a2601d 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
index 931da71..c5c14da 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
index 3672d18..cb3d003 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
index e15d912..de725ef 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
index e3b7301..999ee31 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
index bb26948..f63c847 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
index 1fa9d53..03c9aa2 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc b/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
index b445d74..d718db9 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
index 4a220a9..6b73bd9 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc b/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
index e19a891..9d10067 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
index 572c658..c8b0532 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
index d0a5fe2..98b5098 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
@@ -2,7 +2,6 @@
 // { dg-options "-fno-inline -g0" }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 // { dg-final { scan-assembler-not "_ZNSt13shared_futureIvEC2Ev" } }
 // { dg-final { scan-assembler-not "_ZNSt13shared_futureIiEC2Ev" } }
 
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
index 4628858..40eed23 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
index ba96ab3..567b2ec 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
index 3d2666c..0484053 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
index ae20b01..a6debee 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
index 4548fcc..6b2bc3c 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
index efb84df..f9447f6 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
index 20db446..3a237d7 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
index 747456c..5238821 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
index bf925f1..52058c8 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
index 714c4d2..d38fe07 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
index e99979a..2f70874 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
index 715b7fe..49fc122 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
 //

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libstdc++: Allow using <future> without lock free atomic int
  2016-12-19 17:58   ` Jonathan Wakely
@ 2017-01-03 15:32     ` Jonathan Wakely
  2017-01-04 11:02       ` Jonathan Wakely
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Wakely @ 2017-01-03 15:32 UTC (permalink / raw)
  To: Pauli; +Cc: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 3084 bytes --]

On 19/12/16 17:52 +0000, Jonathan Wakely wrote:
>On 16/12/16 17:52 +0000, Jonathan Wakely wrote:
>>On 09/11/16 23:26 +0200, Pauli wrote:
>>>Compiling programs using std::future for old arm processors fails. The
>>>problem is caused by preprocessor check for atomic lock free int.
>>>
>>>Future can be changed to work correctly without lock free atomics with
>>>minor changes to exception_ptr implementation.
>>>
>>>Without lock free atomics there is question if deadlock can happen. But
>>>atomic operations can't call outside code preventing any ABBA or
>>>recursive mutex acquiring deadlocks.
>>>Deadlock could happen if throwing an exception or access
>>>is_lock_free() == false atomic from asynchronous signal handler.
>>>Throwing from signal handler is undefined behavior. I don't know about
>>>accessing atomics from asynchronous signal handler but that feels like
>>>undefined behavior if is_lock_free returns false.
>>>
>>>Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
>>>
>>>differences to current if atomic builtins available:
>>>* Race detector annotations that are empty by default
>>>* Check for __gthread_active_p
>>>* Generate x86 code uses xadd instead of xsub
>>>This makes code a bit worse. But problem is duplicated to any other user
>>>of __exchange_and_add. The internal API implementation should be fixed
>>>to generate better code for all cases. But that is a follow up patch.
>>
>>I'd prefer to do it so we don't change anything for the targets that
>>already work. Your follow-up patch missed the deadline for GCC 7 and
>>so will have to wait for GCC 8 now, and we don't want to pessimize
>>x86.
>>
>>Also, I think your patch actually breaks some GNU/Linux targets,
>>because you removed the <atomic_lockfree_defines.h> header from
>><exception>, which means that in libsupc++/guard.cc the macro
>>ATOMIC_INT_LOCK_FREE is no longer defined, and so _GLIBCXX_USE_FUTEX
>>doesn't get defined. Now arguably guard.cc should have been including
>>the header directly, but it still shows why such an invasive patch is
>>a bad idea at this stage of the GCC 7 process.
>>
>>The attached patch attempts to make exception propagation work for all
>>targets, without changing anything if it already works.
>>
>>Do you see any problems with this alternative approach?
>>Could you please test it for armv5te?
>>
>>It passes all tests for x86_64-linux and ppc64le-linux.
>>
>>For your follow-up patch, do you already have a copyright assignment
>>for contributions to GCC? We'll probably need that before it can be
>>accepted. We don't need one for this patch, because what remains of
>>your original patch is just the testsuite changes, which are
>>mechanical and not copyrightable.
>
>We also need to adjust the linker script to avoid adding new exports
>to old symbol versions, revised patch attached. I think it would be
>better to make configure define a macro like
>HAVE_EXCEPTION_PTR_SINCE_GCC6 and use that in the linker script
>instead of testing __GCC_ATOMIC_INT_LOCK_FREE directly. I'll work on
>that.

Here's what I plan to commit to trunk tomorrow.



[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 77663 bytes --]

commit fa070e976709218d9927e2ed880bd29f7f98106f
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Dec 16 15:22:21 2016 +0000

    Support exception propagation without lock-free atomic int
    
    2017-01-03  Pauli Nieminen  <suokkos@gmail.com>
    	    Jonathan Wakely  <jwakely@redhat.com>
    
    	PR libstdc++/64735
    	* acinclude.m4 (GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER): Define.
    	* config.h.in: Regenerate.
    	* config/abi/pre/gnu.ver [HAVE_EXCEPTION_PTR_SINCE_GCC46]
    	(GLIBCXX_3.4.15, GLIBCXX_3.4.21, CXXABI_1.3.3, CXXABI_1.3.5): Make
    	exports for exception_ptr, nested_exception, and future conditional.
    	[HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.23, CXXABI_1.3.11): Add
    	exports for exception_ptr, nested_exception, and future conditional.
    	* configure: Regenerate.
    	* configure.ac: Use GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER.
    	* include/std/future: Remove check for ATOMIC_INT_LOCK_FREE
    	* libsupc++/eh_atomics.h: New file for internal use only.
    	(__eh_atomic_inc, __eh_atomic_dec): New.
    	* libsupc++/eh_ptr.cc (exception_ptr::_M_addref)
    	(exception_ptr::_M_release) (__gxx_dependent_exception_cleanup)
    	(rethrow_exception): Use eh_atomics.h reference counting helpers.
    	* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise.
    	* libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise.
    	* libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE.
    	* libsupc++/exception_ptr.h: Likewise.
    	* libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro.
    	* libsupc++/nested_exception.cc: Remove check for
    	ATOMIC_INT_LOCK_FREE.
    	* libsupc++/nested_exception.h: Likewise.
    	* src/c++11/future.cc: Likewise.
    	* testsuite/18_support/exception_ptr/*: Remove atomic builtins checks.
    	* testsuite/18_support/nested_exception/*: Likewise.
    	* testsuite/30_threads/async/*: Likewise.
    	* testsuite/30_threads/future/*: Likewise.
    	* testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
    	* testsuite/30_threads/packaged_task/*: Likewise.
    	* testsuite/30_threads/promise/*: Likewise.
    	* testsuite/30_threads/shared_future/*: Likewise.

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index c88e473..a7e1c26 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -4480,6 +4480,43 @@ AC_DEFUN([GLIBCXX_CHECK_SIZE_T_MANGLING], [
     [Define to the letter to which size_t is mangled.])
 ])
 
+dnl
+dnl Determine whether std::exception_ptr symbols should be exported with
+dnl the symbol versions from GCC 4.6.0 or GCC 7.0.0, depending on which
+dnl release first added support for std::exception_ptr. Originally it was
+dnl only supported for targets with always-lock-free atomics for int, but
+dnl since GCC 7.0 it is supported for all targets.
+dnl
+AC_DEFUN([GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER], [
+  if test $enable_symvers != no; then
+    AC_MSG_CHECKING([for first version to support std::exception_ptr])
+    case ${target} in
+      aarch64-*-* | alpha-*-* | hppa*-*-* | i?86-*-* | x86_64-*-* | \
+      m68k-*-* | powerpc*-*-* | s390*-*-* | *-*-solaris* )
+        ac_exception_ptr_since_gcc46=yes
+        ;;
+      *)
+        # If the value of this macro changes then we will need to hardcode
+        # yes/no here for additional targets based on the original value.
+        AC_TRY_COMPILE([], [
+          #if __GCC_ATOMIC_INT_LOCK_FREE <= 1
+          # error atomic int not always lock free
+          #endif
+          ],
+          [ac_exception_ptr_since_gcc46=yes],
+          [ac_exception_ptr_since_gcc46=no])
+        ;;
+    esac
+    if test x"$ac_exception_ptr_since_gcc46" = x"yes" ; then
+      AC_DEFINE(HAVE_EXCEPTION_PTR_SINCE_GCC46, 1,
+        [Define to 1 if GCC 4.6 supported std::exception_ptr for the target])
+      AC_MSG_RESULT([4.6.0])
+    else
+      AC_MSG_RESULT([7.1.0])
+    fi
+  fi
+])
+
 # Macros from the top-level gcc directory.
 m4_include([../config/gc++filt.m4])
 m4_include([../config/tls.m4])
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 09ddfeb..41ad510 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -123,6 +123,9 @@
 /* Define if EWOULDBLOCK exists. */
 #undef HAVE_EWOULDBLOCK
 
+/* Define to 1 if GCC 4.6 supported std::exception_ptr for the target */
+#undef HAVE_EXCEPTION_PTR_SINCE_GCC46
+
 /* Define to 1 if you have the <execinfo.h> header file. */
 #undef HAVE_EXECINFO_H
 
diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index 10bba01..3e6e70b 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -1503,6 +1503,9 @@ GLIBCXX_3.4.15 {
     _ZNSt14error_categoryC*;
     _ZNSt14error_categoryD*;
 
+#ifdef HAVE_EXCEPTION_PTR_SINCE_GCC46
+    # std::future symbols are only present in this version when
+    # atomic operations on int are always lock-free.
     _ZNSt13__future_base12_Result_baseC*;
     _ZNSt13__future_base12_Result_baseD*;
     _ZTINSt13__future_base12_Result_baseE;
@@ -1511,6 +1514,7 @@ GLIBCXX_3.4.15 {
     _ZNSt13__future_base11_State_baseD*;
     _ZTINSt13__future_base11_State_baseE;
     _ZTVNSt13__future_base11_State_baseE;
+#endif
 
 } GLIBCXX_3.4.14;
 
@@ -1687,8 +1691,10 @@ GLIBCXX_3.4.21 {
 
     # std::notify_all_at_thread_exit
     _ZSt25notify_all_at_thread_exitRSt18condition_variableSt11unique_lockISt5mutexE;
+#ifdef HAVE_EXCEPTION_PTR_SINCE_GCC46
     # std::__future_base::_State_baseV2::_Make_ready::_M_set()
     _ZNSt13__future_base13_State_baseV211_Make_ready6_M_setEv;
+#endif
 
     # ABI-tagged std::basic_string
     _ZNSt7__cxx1112basic_stringI[cw]St11char_traitsI[cw]ESaI[cw]EE1[01]**;
@@ -1947,6 +1953,16 @@ GLIBCXX_3.4.23 {
     _ZNSsC[12]ERKSs[jmy]RKSaIcE;
     _ZNSbIwSt11char_traitsIwESaIwEEC[12]ERKS2_mRKS1_;
 
+#ifndef HAVE_EXCEPTION_PTR_SINCE_GCC46
+    # std::future symbols are exported in the first version to support
+    # std::exception_ptr
+    _ZNSt13__future_base12_Result_baseC*;
+    _ZNSt13__future_base12_Result_baseD*;
+    _ZTINSt13__future_base12_Result_baseE;
+    _ZTVNSt13__future_base12_Result_baseE;
+    _ZNSt13__future_base13_State_baseV211_Make_ready6_M_setEv;
+#endif
+
 } GLIBCXX_3.4.22;
 
 # Symbols in the support library (libsupc++) have their own tag.
@@ -2080,6 +2096,7 @@ CXXABI_1.3.3 {
     _ZTIPDi;
     _ZTIPKDi;
 
+#ifdef HAVE_EXCEPTION_PTR_SINCE_GCC46
     # exception_ptr
     _ZNSt15__exception_ptr13exception_ptrC1Ev;
     _ZNSt15__exception_ptr13exception_ptrC2Ev;
@@ -2099,6 +2116,7 @@ CXXABI_1.3.3 {
 
     _ZSt17current_exceptionv;
     _ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE;
+#endif
 
 } CXXABI_1.3.2;
 
@@ -2129,10 +2147,12 @@ CXXABI_1.3.5 {
     # FNV hash.
     _ZSt15_Fnv_hash_bytesPKv*;
 
+#ifdef HAVE_EXCEPTION_PTR_SINCE_GCC46
     # std::nested_exception
     _ZNSt16nested_exceptionD*;
     _ZTISt16nested_exception;
     _ZTVSt16nested_exception;
+#endif
 
 } CXXABI_1.3.4;
 
@@ -2209,6 +2229,33 @@ CXXABI_1.3.11 {
     _ZdaPvSt11align_val_tRKSt9nothrow_t;
     _ZdaPv[jmy]St11align_val_t;
 
+#ifndef HAVE_EXCEPTION_PTR_SINCE_GCC46
+    # exception_ptr
+    _ZNSt15__exception_ptr13exception_ptrC1Ev;
+    _ZNSt15__exception_ptr13exception_ptrC2Ev;
+    _ZNSt15__exception_ptr13exception_ptrC1ERKS0_;
+    _ZNSt15__exception_ptr13exception_ptrC2ERKS0_;
+    _ZNSt15__exception_ptr13exception_ptrC1EMS0_FvvE;
+    _ZNSt15__exception_ptr13exception_ptrC2EMS0_FvvE;
+    _ZNSt15__exception_ptr13exception_ptrD1Ev;
+    _ZNSt15__exception_ptr13exception_ptrD2Ev;
+    _ZNSt15__exception_ptr13exception_ptraSERKS0_;
+    _ZNKSt15__exception_ptr13exception_ptrcvMS0_FvvEEv;
+    _ZNKSt15__exception_ptr13exception_ptrntEv;
+    _ZNKSt15__exception_ptr13exception_ptr20__cxa_exception_typeEv;
+    _ZNSt15__exception_ptr13exception_ptr4swapERS0_;
+    _ZNSt15__exception_ptreqERKNS_13exception_ptrES2_;
+    _ZNSt15__exception_ptrneERKNS_13exception_ptrES2_;
+
+    _ZSt17current_exceptionv;
+    _ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE;
+
+    # std::nested_exception
+    _ZNSt16nested_exceptionD*;
+    _ZTISt16nested_exception;
+    _ZTVSt16nested_exception;
+#endif
+
 } CXXABI_1.3.10;
 
 # Symbols in the support library (libsupc++) supporting transactional memory.
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index cbd77f0..be6763a 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -80664,6 +80664,55 @@ _ACEOF
 
 
 
+# Check which release added std::exception_ptr for the target
+
+  if test $enable_symvers != no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for first version to support std::exception_ptr" >&5
+$as_echo_n "checking for first version to support std::exception_ptr... " >&6; }
+    case ${target} in
+      aarch64-*-* | alpha-*-* | hppa*-*-* | i?86-*-* | x86_64-*-* | \
+      m68k-*-* | powerpc*-*-* | s390*-*-* | *-*-solaris* )
+        ac_exception_ptr_since_gcc46=yes
+        ;;
+      *)
+        # If the value of this macro changes then we will need to hardcode
+        # yes/no here for additional targets based on the original value.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+          #if __GCC_ATOMIC_INT_LOCK_FREE <= 1
+          # error atomic int not always lock free
+          #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_exception_ptr_since_gcc46=yes
+else
+  ac_exception_ptr_since_gcc46=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+        ;;
+    esac
+    if test x"$ac_exception_ptr_since_gcc46" = x"yes" ; then
+
+$as_echo "#define HAVE_EXCEPTION_PTR_SINCE_GCC46 1" >>confdefs.h
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: 4.6.0" >&5
+$as_echo "4.6.0" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: 7.1.0" >&5
+$as_echo "7.1.0" >&6; }
+    fi
+  fi
+
+
 # Define documentation rules conditionally.
 
 # See if makeinfo has been installed and is modern enough
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index 7d0fafa..3d61771 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -419,6 +419,9 @@ GLIBCXX_CHECK_FILESYSTEM_DEPS
 # For Transactional Memory TS
 GLIBCXX_CHECK_SIZE_T_MANGLING
 
+# Check which release added std::exception_ptr for the target
+GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER
+
 # Define documentation rules conditionally.
 
 # See if makeinfo has been installed and is modern enough
diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future
index 7897b6e..6351d7e 100644
--- a/libstdc++-v3/include/std/future
+++ b/libstdc++-v3/include/std/future
@@ -192,8 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     future<__async_result_of<_Fn, _Args...>>
     async(_Fn&& __fn, _Args&&... __args);
 
-#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
-  && (ATOMIC_INT_LOCK_FREE > 1)
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
 
   /// Base class and enclosing scope.
   struct __future_base
@@ -1751,7 +1750,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #endif // _GLIBCXX_ASYNC_ABI_COMPAT
 #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
-       // && ATOMIC_INT_LOCK_FREE
 
   // @} group futures
 _GLIBCXX_END_NAMESPACE_VERSION
diff --git a/libstdc++-v3/libsupc++/eh_atomics.h b/libstdc++-v3/libsupc++/eh_atomics.h
new file mode 100644
index 0000000..71b42a4
--- /dev/null
+++ b/libstdc++-v3/libsupc++/eh_atomics.h
@@ -0,0 +1,84 @@
+// Exception Handling support header for -*- C++ -*-
+
+// Copyright (C) 2016 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file eh_atomics.h
+ *  This is an internal header file, included by library source files.
+ *  Do not attempt to use it directly.
+ */
+
+#ifndef _EH_ATOMICS_H
+#define _EH_ATOMICS_H 1
+
+#include <bits/c++config.h>
+#include <bits/atomic_word.h>
+#include <bits/atomic_lockfree_defines.h>
+#if ATOMIC_INT_LOCK_FREE <= 1
+# include <ext/atomicity.h>
+#endif
+
+#pragma GCC visibility push(default)
+extern "C++" {
+namespace __gnu_cxx
+{
+  void
+  __eh_atomic_inc (_Atomic_word* __count) __attribute__((always_inline));
+
+  bool
+  __eh_atomic_dec (_Atomic_word* __count) __attribute__((always_inline));
+
+  // Increments the count.
+  inline void
+  __eh_atomic_inc (_Atomic_word* __count)
+  {
+#if ATOMIC_INT_LOCK_FREE > 1
+    __atomic_add_fetch (__count, 1, __ATOMIC_ACQ_REL);
+#else
+    _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE (__count);
+    __gnu_cxx::__atomic_add_dispatch (__count, 1);
+    _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER (__count);
+#endif
+  }
+
+  // Decrements the count and returns true if it reached zero.
+  inline bool
+  __eh_atomic_dec (_Atomic_word* __count)
+  {
+#if ATOMIC_INT_LOCK_FREE > 1
+    return __atomic_sub_fetch (__count, 1, __ATOMIC_ACQ_REL) == 0;
+#else
+    _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE (__count);
+    if (__gnu_cxx::__exchange_and_add_dispatch (__count, -1) == 1)
+      {
+	_GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER (__count);
+	return true;
+      }
+    return false;
+#endif
+  }
+} // namespace __gnu_cxx
+}
+#pragma GCC visibility pop
+
+#endif // _EH_ATOMICS_H
diff --git a/libstdc++-v3/libsupc++/eh_ptr.cc b/libstdc++-v3/libsupc++/eh_ptr.cc
index 1308ff9..12d8d70 100644
--- a/libstdc++-v3/libsupc++/eh_ptr.cc
+++ b/libstdc++-v3/libsupc++/eh_ptr.cc
@@ -23,9 +23,7 @@
 // <http://www.gnu.org/licenses/>.
 
 #include <bits/c++config.h>
-#include <bits/atomic_lockfree_defines.h>
-
-#if ATOMIC_INT_LOCK_FREE > 1
+#include "eh_atomics.h"
 
 #define _GLIBCXX_EH_PTR_COMPAT
 
@@ -101,7 +99,7 @@ std::__exception_ptr::exception_ptr::_M_addref() noexcept
     {
       __cxa_refcounted_exception *eh =
 	__get_refcounted_exception_header_from_obj (_M_exception_object);
-      __atomic_add_fetch (&eh->referenceCount, 1, __ATOMIC_ACQ_REL);
+      __gnu_cxx::__eh_atomic_inc (&eh->referenceCount);
     }
 }
 
@@ -113,7 +111,7 @@ std::__exception_ptr::exception_ptr::_M_release() noexcept
     {
       __cxa_refcounted_exception *eh =
 	__get_refcounted_exception_header_from_obj (_M_exception_object);
-      if (__atomic_sub_fetch (&eh->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
+      if (__gnu_cxx::__eh_atomic_dec (&eh->referenceCount))
         {
 	  if (eh->exc.exceptionDestructor)
 	    eh->exc.exceptionDestructor (_M_exception_object);
@@ -211,7 +209,7 @@ __gxx_dependent_exception_cleanup(_Unwind_Reason_Code code,
 
   __cxa_free_dependent_exception (dep);
 
-  if (__atomic_sub_fetch (&header->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
+  if (__gnu_cxx::__eh_atomic_dec (&header->referenceCount))
     {
       if (header->exc.exceptionDestructor)
 	header->exc.exceptionDestructor (header + 1);
@@ -230,7 +228,7 @@ std::rethrow_exception(std::exception_ptr ep)
 
   __cxa_dependent_exception *dep = __cxa_allocate_dependent_exception ();
   dep->primaryException = obj;
-  __atomic_add_fetch (&eh->referenceCount, 1,  __ATOMIC_ACQ_REL);
+  __gnu_cxx::__eh_atomic_inc (&eh->referenceCount);
 
   dep->unexpectedHandler = get_unexpected ();
   dep->terminateHandler = get_terminate ();
@@ -252,5 +250,3 @@ std::rethrow_exception(std::exception_ptr ep)
 }
 
 #undef _GLIBCXX_EH_PTR_COMPAT
-
-#endif
diff --git a/libstdc++-v3/libsupc++/eh_throw.cc b/libstdc++-v3/libsupc++/eh_throw.cc
index 397decd..13428d9 100644
--- a/libstdc++-v3/libsupc++/eh_throw.cc
+++ b/libstdc++-v3/libsupc++/eh_throw.cc
@@ -24,6 +24,7 @@
 
 #include <bits/c++config.h>
 #include "unwind-cxx.h"
+#include "eh_atomics.h"
 
 using namespace __cxxabiv1;
 
@@ -42,17 +43,13 @@ __gxx_exception_cleanup (_Unwind_Reason_Code code, _Unwind_Exception *exc)
   if (code != _URC_FOREIGN_EXCEPTION_CAUGHT && code != _URC_NO_REASON)
     __terminate (header->exc.terminateHandler);
 
-#if ATOMIC_INT_LOCK_FREE > 1
-  if (__atomic_sub_fetch (&header->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
+  if (__gnu_cxx::__eh_atomic_dec (&header->referenceCount))
     {
-#endif
       if (header->exc.exceptionDestructor)
 	header->exc.exceptionDestructor (header + 1);
 
       __cxa_free_exception (header + 1);
-#if ATOMIC_INT_LOCK_FREE > 1
     }
-#endif
 }
 
 extern "C" __cxa_refcounted_exception*
diff --git a/libstdc++-v3/libsupc++/eh_tm.cc b/libstdc++-v3/libsupc++/eh_tm.cc
index d0ccd9e..ffb5ef6 100644
--- a/libstdc++-v3/libsupc++/eh_tm.cc
+++ b/libstdc++-v3/libsupc++/eh_tm.cc
@@ -24,6 +24,7 @@
 
 #include <cstdlib>
 #include "unwind-cxx.h"
+#include "eh_atomics.h"
 
 using namespace __cxxabiv1;
 
@@ -45,9 +46,7 @@ free_any_cxa_exception (_Unwind_Exception *eo)
       __cxa_free_dependent_exception (dep);
     }
 
-#if __GCC_ATOMIC_INT_LOCK_FREE > 1
-  if (__atomic_sub_fetch (&h->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
-#endif
+  if (__gnu_cxx::__eh_atomic_dec (&h->referenceCount))
     __cxa_free_exception (h + 1);
 }
 
diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception
index 1ccf329..e51d31c 100644
--- a/libstdc++-v3/libsupc++/exception
+++ b/libstdc++-v3/libsupc++/exception
@@ -35,7 +35,6 @@
 #pragma GCC visibility push(default)
 
 #include <bits/c++config.h>
-#include <bits/atomic_lockfree_defines.h>
 #include <bits/exception.h>
 
 extern "C++" {
@@ -139,7 +138,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
 
 #pragma GCC visibility pop
 
-#if (__cplusplus >= 201103L) && (ATOMIC_INT_LOCK_FREE > 1)
+#if (__cplusplus >= 201103L)
 #include <bits/exception_ptr.h>
 #include <bits/nested_exception.h>
 #endif
diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h
index a2a9017..2447a5a 100644
--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -39,10 +39,6 @@
 #include <typeinfo>
 #include <new>
 
-#if ATOMIC_INT_LOCK_FREE < 2
-#  error This platform does not support exception propagation.
-#endif
-
 extern "C++" {
 
 namespace std 
diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
index ef0b8a8..19953bc 100644
--- a/libstdc++-v3/libsupc++/guard.cc
+++ b/libstdc++-v3/libsupc++/guard.cc
@@ -30,6 +30,7 @@
 #include <new>
 #include <ext/atomicity.h>
 #include <ext/concurrence.h>
+#include <bits/atomic_lockfree_defines.h>
 #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
   && (ATOMIC_INT_LOCK_FREE > 1) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
 # include <climits>
diff --git a/libstdc++-v3/libsupc++/nested_exception.cc b/libstdc++-v3/libsupc++/nested_exception.cc
index 36951e2..7e1b545 100644
--- a/libstdc++-v3/libsupc++/nested_exception.cc
+++ b/libstdc++-v3/libsupc++/nested_exception.cc
@@ -25,7 +25,5 @@
 
 namespace std 
 {
-#if ATOMIC_INT_LOCK_FREE > 1
   nested_exception::~nested_exception() noexcept = default;
-#endif
 } // namespace std
diff --git a/libstdc++-v3/libsupc++/nested_exception.h b/libstdc++-v3/libsupc++/nested_exception.h
index 66e2ebf..35b025a 100644
--- a/libstdc++-v3/libsupc++/nested_exception.h
+++ b/libstdc++-v3/libsupc++/nested_exception.h
@@ -39,10 +39,6 @@
 #include <bits/c++config.h>
 #include <bits/move.h>
 
-#if ATOMIC_INT_LOCK_FREE < 2
-#  error This platform does not support exception propagation.
-#endif
-
 extern "C++" {
 
 namespace std
diff --git a/libstdc++-v3/src/c++11/future.cc b/libstdc++-v3/src/c++11/future.cc
index 3ed5bc9..e138567 100644
--- a/libstdc++-v3/src/c++11/future.cc
+++ b/libstdc++-v3/src/c++11/future.cc
@@ -78,8 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   const char*
   future_error::what() const noexcept { return logic_error::what(); }
 
-#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
-  && (ATOMIC_INT_LOCK_FREE > 1)
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
   __future_base::_Result_base::_Result_base() = default;
 
   __future_base::_Result_base::~_Result_base() = default;
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
index 09d4f38..c7b8055 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
index 5d20f27..43aef95 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
index c478627..3562892 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
index 10eb754..a53b066 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2015-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
index a94ae84..8e0e9c2 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
@@ -17,7 +17,6 @@
 
 // { dg-options "-fno-exceptions -O0" }
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 #include <exception>
 #include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
index 5f83ddc..7ad78e2 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // 2008-05-25  Sebastian Redl  <sebastian.redl@getdesigned.at>
 
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
index 51b3858..58b6a32 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // 2008-05-25  Sebastian Redl  <sebastian.redl@getdesigned.at>
 
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
index 184b4de..f86b189 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
index 3893f5f..bc225d6 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
index bb18a46..4576844 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
index fd47be8..7102be6 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
index 7289cf3..60d01a9 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
index 288c7ef..c5461d8 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // 2008-05-25  Sebastian Redl  <sebastian.redl@getdesigned.at>
 
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc b/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
index 69fd02d..5b55fda 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc b/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
index 29a8aeb..e6993c9 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc b/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
index e0e9fca..b2c4528 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
@@ -1,5 +1,4 @@
 // { dg-do compile { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2015-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc b/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
index 859b505..da0842c 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc b/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
index 52d00ba..7d128f7 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
index cd44b1c..1af61d6 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
index 2f307c8..b477b25 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
index 143521f..55e0e9d 100644
--- a/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
+++ b/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
@@ -1,5 +1,4 @@
 // { dg-do run { target c++11 } }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/42819.cc b/libstdc++-v3/testsuite/30_threads/async/42819.cc
index 9a605fb..87555d3 100644
--- a/libstdc++-v3/testsuite/30_threads/async/42819.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/42819.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/49668.cc b/libstdc++-v3/testsuite/30_threads/async/49668.cc
index 1da2e45..e2f8d8e 100644
--- a/libstdc++-v3/testsuite/30_threads/async/49668.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/49668.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/54297.cc b/libstdc++-v3/testsuite/30_threads/async/54297.cc
index 68b1be0..318f6cb 100644
--- a/libstdc++-v3/testsuite/30_threads/async/54297.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/54297.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 // { dg-require-sleep "" }
 
 // Copyright (C) 2012-2017 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/async/any.cc b/libstdc++-v3/testsuite/30_threads/async/any.cc
index 27fe8c7..03a152f 100644
--- a/libstdc++-v3/testsuite/30_threads/async/any.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/any.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/async.cc b/libstdc++-v3/testsuite/30_threads/async/async.cc
index 3c90bca..34f8ec4 100644
--- a/libstdc++-v3/testsuite/30_threads/async/async.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/async.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/except.cc b/libstdc++-v3/testsuite/30_threads/async/except.cc
index 6047d0c..d2ac3ed 100644
--- a/libstdc++-v3/testsuite/30_threads/async/except.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/except.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc b/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
index 85ece1d..2597d2a 100644
--- a/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/launch.cc b/libstdc++-v3/testsuite/30_threads/async/launch.cc
index 65420ff..2015f7b 100644
--- a/libstdc++-v3/testsuite/30_threads/async/launch.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/launch.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc b/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
index ffcb623..8b38b78 100644
--- a/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
@@ -20,7 +20,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // LWG 2021. Further incorrect usages of result_of
 // Arguments to result_of should use decay.
diff --git a/libstdc++-v3/testsuite/30_threads/async/sync.cc b/libstdc++-v3/testsuite/30_threads/async/sync.cc
index 07cbff9..b41f65d 100644
--- a/libstdc++-v3/testsuite/30_threads/async/sync.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/sync.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
index 53dd4fa..a32070a 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc b/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
index 25de49f..cd50611 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
@@ -2,7 +2,6 @@
 // { dg-options "-fno-inline -g0" }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 // { dg-final { scan-assembler-not "_ZNSt6futureIvEC2Ev" } }
 // { dg-final { scan-assembler-not "_ZNSt6futureIiEC2Ev" } }
 
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
index be3a539..58a7f73 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/default.cc b/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
index b2e148e..783b38e 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/move.cc b/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
index 5a3c0ef..763066b 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
index 52cb2dd..9157348 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/45133.cc b/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
index e16fd08..0a4e901 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/get.cc b/libstdc++-v3/testsuite/30_threads/future/members/get.cc
index 44509e3..531706a 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/get.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/get.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/get2.cc b/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
index da8c048..451d97b 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/share.cc b/libstdc++-v3/testsuite/30_threads/future/members/share.cc
index d08b8d0..9619ff1 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/share.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/share.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/valid.cc b/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
index 66a5db7..b43f1687 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
index 157a28c..cc73758 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
index 408066f..e77606b 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
index 998eda6..f9fef11 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
index aa2ae0a..1a6e262 100644
--- a/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc b/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
index 0c30622..4c15fbf 100644
--- a/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
+++ b/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" } 
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
index a8fb01b..4107004 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
index a80f4b6..a1d4e35 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
index c922038..dd7f214 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
index 8264d19..c729434 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
index e74d3e7..30ae5da 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
index 37f7043..7073360 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2013-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
index e6ba631..c45c9ea 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
index e2ebceb..f664391 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
index 23f7133..e1f99e0 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
index 7c4edb9..f8f501e 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
index f95fbfd..8d007f8 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
index 5bc750b..bd5cbd5 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
index 6d89b08..165b977 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
index 2d63602..cff9279 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target *-*-linux* *-*-gnu* } }
 // { dg-options "-pthread" { target *-*-linux* *-*-gnu* *-*-solaris* } }
 // { dg-require-effective-target c++11 }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
index 3cc2a9c..60700e2 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
index 039384c..e11ef8c 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
index 57c2f45..d0664b0 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
index 1755998..0099f37 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
index 5dd85c2..9a08879 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
index 1cce180..20e14fc 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
index f3439de..7ff3f08 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
index a4231ea..2be1e8d 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
index bde58d3..2643120 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
index 2eb2d09..79a33cd 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
index aec95d7..b2453d0 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
index f131827..422b951 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
index a508b31..ea3d0b4 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
index 76fd7d8..5cda284 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/60966.cc b/libstdc++-v3/testsuite/30_threads/promise/60966.cc
index dff1540..38c45fd 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/60966.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/60966.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/69106.cc b/libstdc++-v3/testsuite/30_threads/promise/69106.cc
index e59d6a7..a209279 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/69106.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/69106.cc
@@ -18,7 +18,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 #include <future>
 
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
index 035f605..0c5d209 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
index f233be2..a51dd2a 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
index 0febeb3..ad7f35b 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
index 002ea04..388da2d 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
index 32e3a6a..837ffae 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
index 921f18b..0d9db76 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
index 9d7e1e8..a62b465 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
index efd44b7..65f9546 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc b/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
index 867ff7f..08331bf 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2014-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc b/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
index f20316a..72ae208 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
index 229577a..117de2c 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
index f285e72..6ff4a34 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
index 6fd8495..1b1a066 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
index fcfa187..7c08278 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
index 9f3839a..0c4e87a 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
index 595f0e9..110b79a 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc b/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
index d0d4b73..15b1a17 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
index 3b125e9..5d6bcf3 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc b/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
index 71a6c64..d083153 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2011-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
index a1d70ff..6716416 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
index e8e5594..afacf44 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
@@ -2,7 +2,6 @@
 // { dg-options "-fno-inline -g0" }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 // { dg-final { scan-assembler-not "_ZNSt13shared_futureIvEC2Ev" } }
 // { dg-final { scan-assembler-not "_ZNSt13shared_futureIiEC2Ev" } }
 
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
index fe1308e..9f037bf 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
index 9d8040c..a4d5c8a 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
index 24777e6..6e9d8f8 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
index f9f71d8..68910c1 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
index 0e205ae..6933bed 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
index 270edab..0e84d8b 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
index 6c50ce4..4bfa177 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
index 1c436c0..dda7a57 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2010-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
index 6f98a86..725180f 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
index 7220af1..7d62ffd 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
index ce0133b..5eac3d1 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
@@ -3,7 +3,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
index 69747d6..a48d45c 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
@@ -1,7 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
-// { dg-require-atomic-builtins "" }
 
 // Copyright (C) 2009-2017 Free Software Foundation, Inc.
 //

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libstdc++: Allow using <future> without lock free atomic int
  2017-01-03 15:32     ` Jonathan Wakely
@ 2017-01-04 11:02       ` Jonathan Wakely
  2017-01-04 15:01         ` Christophe Lyon
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Wakely @ 2017-01-04 11:02 UTC (permalink / raw)
  To: Pauli; +Cc: libstdc++, gcc-patches

On 03/01/17 15:32 +0000, Jonathan Wakely wrote:
>Here's what I plan to commit to trunk tomorrow.

Committed to trunk.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libstdc++: Allow using <future> without lock free atomic int
  2017-01-04 11:02       ` Jonathan Wakely
@ 2017-01-04 15:01         ` Christophe Lyon
  2017-01-04 15:10           ` Jonathan Wakely
  0 siblings, 1 reply; 8+ messages in thread
From: Christophe Lyon @ 2017-01-04 15:01 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Pauli, libstdc++, gcc-patches

Hi Jonathan,

On 4 January 2017 at 12:02, Jonathan Wakely <jwakely@redhat.com> wrote:
> On 03/01/17 15:32 +0000, Jonathan Wakely wrote:
>>
>> Here's what I plan to commit to trunk tomorrow.
>
>
> Committed to trunk.
>
>
After this commit (r244051), I do see improvements, but also a few new failures.
The big picture is at
http://people.linaro.org/~christophe.lyon/cross-validation/gcc/trunk/244051/report-build-info.html

Where the expected improvements for arm-none-eabi, with default cpu&fpu are:
http://people.linaro.org/~christophe.lyon/cross-validation/gcc/trunk/244051/arm-none-eabi/diff-libstdc++-rh60-arm-none-eabi-default-default-default.txt

New failures appear when forcing -march=armv5t in runtestflags (the 3
red items in the 1st report):

  - FAIL appears              [     => FAIL]:

  18_support/exception_ptr/60612-terminate.cc execution test
  18_support/exception_ptr/60612-unexpected.cc execution test
  30_threads/packaged_task/members/at_thread_exit.cc execution test
  30_threads/promise/members/at_thread_exit.cc execution test

Note that in these cases we are compiling the test cases with
-march=armv5t, but link
with libraries built --with-cpu=cortex-a9, so there might be a mismatch?

Christophe

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libstdc++: Allow using <future> without lock free atomic int
  2017-01-04 15:01         ` Christophe Lyon
@ 2017-01-04 15:10           ` Jonathan Wakely
  2017-01-04 15:22             ` Christophe Lyon
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Wakely @ 2017-01-04 15:10 UTC (permalink / raw)
  To: Christophe Lyon; +Cc: Pauli, libstdc++, gcc-patches

On 04/01/17 16:00 +0100, Christophe Lyon wrote:
>Hi Jonathan,
>
>On 4 January 2017 at 12:02, Jonathan Wakely <jwakely@redhat.com> wrote:
>> On 03/01/17 15:32 +0000, Jonathan Wakely wrote:
>>>
>>> Here's what I plan to commit to trunk tomorrow.
>>
>>
>> Committed to trunk.
>>
>>
>After this commit (r244051), I do see improvements, but also a few new failures.
>The big picture is at
>http://people.linaro.org/~christophe.lyon/cross-validation/gcc/trunk/244051/report-build-info.html
>
>Where the expected improvements for arm-none-eabi, with default cpu&fpu are:
>http://people.linaro.org/~christophe.lyon/cross-validation/gcc/trunk/244051/arm-none-eabi/diff-libstdc++-rh60-arm-none-eabi-default-default-default.txt
>
>New failures appear when forcing -march=armv5t in runtestflags (the 3
>red items in the 1st report):
>
>  - FAIL appears              [     => FAIL]:
>
>  18_support/exception_ptr/60612-terminate.cc execution test
>  18_support/exception_ptr/60612-unexpected.cc execution test
>  30_threads/packaged_task/members/at_thread_exit.cc execution test
>  30_threads/promise/members/at_thread_exit.cc execution test
>
>Note that in these cases we are compiling the test cases with
>-march=armv5t, but link
>with libraries built --with-cpu=cortex-a9, so there might be a mismatch?

Yes, this is probably the same issue as PR63829

Richard's comment on the bug report says that arm should always use
atomics, via kernel helpers if necessary, so that there is no ABI
change when using -march for older CPUs.

I don't know how to do that, but I hope we can make some progress on
it for gcc 8.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libstdc++: Allow using <future> without lock free atomic int
  2017-01-04 15:10           ` Jonathan Wakely
@ 2017-01-04 15:22             ` Christophe Lyon
  0 siblings, 0 replies; 8+ messages in thread
From: Christophe Lyon @ 2017-01-04 15:22 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Pauli, libstdc++, gcc-patches

On 4 January 2017 at 16:10, Jonathan Wakely <jwakely@redhat.com> wrote:
> On 04/01/17 16:00 +0100, Christophe Lyon wrote:
>>
>> Hi Jonathan,
>>
>> On 4 January 2017 at 12:02, Jonathan Wakely <jwakely@redhat.com> wrote:
>>>
>>> On 03/01/17 15:32 +0000, Jonathan Wakely wrote:
>>>>
>>>>
>>>> Here's what I plan to commit to trunk tomorrow.
>>>
>>>
>>>
>>> Committed to trunk.
>>>
>>>
>> After this commit (r244051), I do see improvements, but also a few new
>> failures.
>> The big picture is at
>>
>> http://people.linaro.org/~christophe.lyon/cross-validation/gcc/trunk/244051/report-build-info.html
>>
>> Where the expected improvements for arm-none-eabi, with default cpu&fpu
>> are:
>>
>> http://people.linaro.org/~christophe.lyon/cross-validation/gcc/trunk/244051/arm-none-eabi/diff-libstdc++-rh60-arm-none-eabi-default-default-default.txt
>>
>> New failures appear when forcing -march=armv5t in runtestflags (the 3
>> red items in the 1st report):
>>
>>  - FAIL appears              [     => FAIL]:
>>
>>  18_support/exception_ptr/60612-terminate.cc execution test
>>  18_support/exception_ptr/60612-unexpected.cc execution test
>>  30_threads/packaged_task/members/at_thread_exit.cc execution test
>>  30_threads/promise/members/at_thread_exit.cc execution test
>>
>> Note that in these cases we are compiling the test cases with
>> -march=armv5t, but link
>> with libraries built --with-cpu=cortex-a9, so there might be a mismatch?
>
>
> Yes, this is probably the same issue as PR63829

Indeed.

>
> Richard's comment on the bug report says that arm should always use
> atomics, via kernel helpers if necessary, so that there is no ABI
> change when using -march for older CPUs.
>
> I don't know how to do that, but I hope we can make some progress on
> it for gcc 8.
>
That would be good, maybe Richard can post an example in
bugzilla?

Thanks,

Christophe

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-01-04 15:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-09 21:26 [PATCH] libstdc++: Allow using <future> without lock free atomic int Pauli
2016-12-16 17:56 ` Jonathan Wakely
2016-12-19 17:58   ` Jonathan Wakely
2017-01-03 15:32     ` Jonathan Wakely
2017-01-04 11:02       ` Jonathan Wakely
2017-01-04 15:01         ` Christophe Lyon
2017-01-04 15:10           ` Jonathan Wakely
2017-01-04 15:22             ` Christophe Lyon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).