summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-04 10:54:59 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-04 10:54:59 +0000
commitc45be7f1aef92f2ea7363cbc4627f943b83ca902 (patch)
treea919cdc92c61faa689f062dc8895b39ea5465098 /libstdc++-v3
parentaff1170a214268eee9d3dc47b3179ae2163180ee (diff)
downloadgcc-c45be7f1aef92f2ea7363cbc4627f943b83ca902.tar.gz
Support exception propagation without lock-free atomic int
2017-01-04 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244051 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog37
-rw-r--r--libstdc++-v3/acinclude.m437
-rw-r--r--libstdc++-v3/config.h.in3
-rw-r--r--libstdc++-v3/config/abi/pre/gnu.ver47
-rwxr-xr-xlibstdc++-v3/configure49
-rw-r--r--libstdc++-v3/configure.ac3
-rw-r--r--libstdc++-v3/include/std/future4
-rw-r--r--libstdc++-v3/libsupc++/eh_atomics.h84
-rw-r--r--libstdc++-v3/libsupc++/eh_ptr.cc14
-rw-r--r--libstdc++-v3/libsupc++/eh_throw.cc7
-rw-r--r--libstdc++-v3/libsupc++/eh_tm.cc5
-rw-r--r--libstdc++-v3/libsupc++/exception3
-rw-r--r--libstdc++-v3/libsupc++/exception_ptr.h4
-rw-r--r--libstdc++-v3/libsupc++/guard.cc1
-rw-r--r--libstdc++-v3/libsupc++/nested_exception.cc2
-rw-r--r--libstdc++-v3/libsupc++/nested_exception.h4
-rw-r--r--libstdc++-v3/src/c++11/future.cc3
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr_2.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/move.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/nested_exception/51438.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/nested_exception/62154.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/nested_exception/68139.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/nested_exception/cons.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc1
-rw-r--r--libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/async/42819.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/async/49668.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/async/54297.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/async/any.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/async/async.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/async/except.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/async/launch.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/async/lwg2021.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/async/sync.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/cons/default.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/cons/move.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/members/45133.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/members/get.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/members/get2.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/members/share.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/members/valid.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/members/wait.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/60966.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/69106.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/1.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/move.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/members/swap.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc1
-rw-r--r--libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc1
127 files changed, 273 insertions, 144 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index cb477b3a3ff..26483dab21a 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,40 @@
+2017-01-04 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.
+
2017-01-03 Gerald Pfeifer <gerald@pfeifer.com>
* doc/xml/manual/documentation_hacking.xml: sourceforge.net now
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index c88e4732d0b..95853057303 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.1.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.1 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 09ddfeb7993..41ad510fbc2 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 10bba011456..3e6e70b6cff 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 cbd77f002bd..be6763a0e42 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 7d0fafab514..3d6177116c2 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 7897b6e2e0b..6351d7ef494 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 00000000000..71b42a4b847
--- /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 1308ff938c5..12d8d70268a 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 397decd2a61..13428d92da7 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 d0ccd9e8ec3..ffb5ef6ccfc 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 1ccf329f5a5..e51d31c938b 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 a2a90172551..2447a5a4639 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 ef0b8a88dc1..19953bc52f0 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 36951e220e3..7e1b545184e 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 66e2ebf58ee..35b025afd84 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 3ed5bc9ce49..e138567abe1 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 09d4f382eff..c7b8055ce7d 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 5d20f27307b..43aef953110 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 c4786274102..356289239a9 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 10eb7547596..a53b0669b83 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 a94ae84684f..8e0e9c2fcb6 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 5f83ddc2640..7ad78e295c8 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 51b3858cd1f..58b6a32da3c 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 184b4ded60f..f86b1897a75 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 3893f5f3676..bc225d6cd78 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 bb18a467c46..4576844090b 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 fd47be8e9df..7102be66326 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 7289cf31b07..60d01a99220 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 288c7ef1e26..c5461d81c2b 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 69fd02d9db1..5b55fdae4d7 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 29a8aebdf78..e6993c93446 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 e0e9fcaa2ba..b2c4528ab56 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 859b50552e5..da0842cd786 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 52d00ba91da..7d128f75fb0 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 cd44b1c3d0d..1af61d61163 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 2f307c86d66..b477b2541e9 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 143521f840d..55e0e9de4a5 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 9a605fb51db..87555d320c2 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 1da2e45d91c..e2f8d8ef8a8 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 68b1be00de4..318f6cbe14a 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 27fe8c75d3a..03a152f8a99 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 3c90bcaf0d8..34f8ec44143 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 6047d0c5a03..d2ac3ed4203 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 85ece1d565a..2597d2ab030 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 65420ffc633..2015f7b0097 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 ffcb623fd59..8b38b78f7bc 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 07cbff9b506..b41f65d6fbf 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 53dd4fad08c..a32070a7747 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 25de49f4afc..cd5061156ad 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 be3a53940af..58a7f73c968 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 b2e148e7546..783b38e3a7f 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 5a3c0efcfe2..763066b5139 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 52cb2dda67e..91573484ae1 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 e16fd0898bf..0a4e9010a26 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 44509e3645f..531706a66df 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 da8c048ab10..451d97b4370 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 d08b8d0415d..9619ff189e2 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 66a5db7957b..b43f1687f13 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 157a28c8676..cc7375829d8 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 408066f3534..e77606b4a05 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 998eda6eeb5..f9fef11f0ea 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 aa2ae0aa0a9..1a6e2623493 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 0c30622d6ae..4c15fbf1fa8 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 a8fb01bd80f..4107004e2e4 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 a80f4b6a029..a1d4e35e20a 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 c922038a43f..dd7f21457d2 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 8264d19daac..c7294349428 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 e74d3e7b4d0..30ae5da5dda 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 37f704316c2..7073360c818 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 e6ba6313543..c45c9eaab1b 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 e2ebceb5b44..f6643918eac 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 23f713397a4..e1f99e0dfab 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 7c4edb9ba85..f8f501e200b 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 f95fbfd264f..8d007f8a52b 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 5bc750bb1c1..bd5cbd5d5a0 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 6d89b087d81..165b9775a1b 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 2d63602b851..cff92797dfd 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 3cc2a9c6e18..60700e21544 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 039384cca4b..e11ef8c172a 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 57c2f457792..d0664b0d822 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 1755998cc57..0099f3792d4 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 5dd85c2ad3e..9a08879e0c6 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 1cce1802630..20e14fcea7d 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 f3439deb7d3..7ff3f0869e2 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 a4231ea6dfa..2be1e8d673e 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 bde58d3fa06..2643120ec36 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 2eb2d099447..79a33cdda5c 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 aec95d7860c..b2453d0ff73 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 f1318271853..422b95152f5 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 a508b3131c9..ea3d0b4358e 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 76fd7d82b7f..5cda284b180 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 dff1540acfd..38c45fda19b 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 e59d6a7de0b..a2092793ed8 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 035f6058c48..0c5d209836e 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 f233be2097d..a51dd2a0628 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 0febeb3d26b..ad7f35ba210 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 002ea042776..388da2d49d3 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 32e3a6a30c8..837ffaeee13 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 921f18b42ae..0d9db76f78c 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 9d7e1e88d7c..a62b4652792 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 efd44b7a97d..65f9546971f 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 867ff7f8035..08331bf9d3b 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 f20316a3dab..72ae208f718 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 229577a16de..117de2c9b25 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 f285e726960..6ff4a348f2a 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 6fd84956c0b..1b1a0667860 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 fcfa187e391..7c08278ecf2 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 9f3839ab567..0c4e87a253d 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 595f0e94394..110b79ad49d 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 d0d4b730981..15b1a176309 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 3b125e99e1c..5d6bcf35941 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 71a6c648e7c..d08315381fd 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 a1d70ff002f..6716416d832 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 e8e5594889c..afacf447016 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 fe1308ea0cd..9f037bfd7cc 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 9d8040c7343..a4d5c8a1df3 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 24777e6891f..6e9d8f86647 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 f9f71d801a1..68910c11ef9 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 0e205ae882e..6933bede473 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 270edab9869..0e84d8b13b8 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 6c50ce49160..4bfa177d4e7 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 1c436c079a6..dda7a571b61 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 6f98a862cbc..725180fc263 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 7220af1c83e..7d62ffd9149 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 ce0133b861e..5eac3d12f41 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 69747d6b247..a48d45c4ccd 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.
//