blob: 5ace0348ededa95153c40bee2a55c72c70af3624 [file] [log] [blame]
Brad Bishop120ebc82018-02-01 10:27:11 -05001From cf17b2b404eed4778664b69d20e1943b619bfd38 Mon Sep 17 00:00:00 2001
2From: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Wed, 4 Jan 2017 10:54:59 +0000
4Subject: [PATCH 1/1] Support exception propagation without lock-free atomic
5 int
6
72017-01-04 Pauli Nieminen <suokkos@gmail.com>
8 Jonathan Wakely <jwakely@redhat.com>
9
10 PR libstdc++/64735
11 * acinclude.m4 (GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER): Define.
12 * config.h.in: Regenerate.
13 * config/abi/pre/gnu.ver [HAVE_EXCEPTION_PTR_SINCE_GCC46]
14 (GLIBCXX_3.4.15, GLIBCXX_3.4.21, CXXABI_1.3.3, CXXABI_1.3.5): Make
15 exports for exception_ptr, nested_exception, and future conditional.
16 [HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.23, CXXABI_1.3.11): Add
17 exports for exception_ptr, nested_exception, and future conditional.
18 * configure: Regenerate.
19 * configure.ac: Use GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER.
20 * include/std/future: Remove check for ATOMIC_INT_LOCK_FREE
21 * libsupc++/eh_atomics.h: New file for internal use only.
22 (__eh_atomic_inc, __eh_atomic_dec): New.
23 * libsupc++/eh_ptr.cc (exception_ptr::_M_addref)
24 (exception_ptr::_M_release) (__gxx_dependent_exception_cleanup)
25 (rethrow_exception): Use eh_atomics.h reference counting helpers.
26 * libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise.
27 * libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise.
28 * libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE.
29 * libsupc++/exception_ptr.h: Likewise.
30 * libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro.
31 * libsupc++/nested_exception.cc: Remove check for
32 ATOMIC_INT_LOCK_FREE.
33 * libsupc++/nested_exception.h: Likewise.
34 * src/c++11/future.cc: Likewise.
35 * testsuite/18_support/exception_ptr/*: Remove atomic builtins checks.
36 * testsuite/18_support/nested_exception/*: Likewise.
37 * testsuite/30_threads/async/*: Likewise.
38 * testsuite/30_threads/future/*: Likewise.
39 * testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
40 * testsuite/30_threads/packaged_task/*: Likewise.
41 * testsuite/30_threads/promise/*: Likewise.
42 * testsuite/30_threads/shared_future/*: Likewise.
43
44git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244051 138bc75d-0d04-0410-961f-82ee72b054a4
45
46This is a backport of the upstream commit.
47
48Signed-off-by: James Feist <james.feist@linux.intel.com>
49---
50 libstdc++-v3/ChangeLog | 38 +++++++++-
51 libstdc++-v3/acinclude.m4 | 37 ++++++++++
52 libstdc++-v3/config.h.in | 3 +
53 libstdc++-v3/config/abi/pre/gnu.ver | 10 +++
54 libstdc++-v3/configure | 49 +++++++++++++
55 libstdc++-v3/configure.ac | 3 +
56 libstdc++-v3/include/std/future | 4 +-
57 libstdc++-v3/libsupc++/eh_atomics.h | 84 ++++++++++++++++++++++
58 libstdc++-v3/libsupc++/eh_ptr.cc | 14 ++--
59 libstdc++-v3/libsupc++/eh_throw.cc | 7 +-
60 libstdc++-v3/libsupc++/eh_tm.cc | 5 +-
61 libstdc++-v3/libsupc++/exception | 3 +-
62 libstdc++-v3/libsupc++/exception_ptr.h | 4 --
63 libstdc++-v3/libsupc++/guard.cc | 1 +
64 libstdc++-v3/libsupc++/nested_exception.cc | 2 -
65 libstdc++-v3/libsupc++/nested_exception.h | 4 --
66 libstdc++-v3/src/c++11/future.cc | 3 +-
67 .../testsuite/18_support/exception_ptr/40296.cc | 1 -
68 .../18_support/exception_ptr/60612-terminate.cc | 1 -
69 .../18_support/exception_ptr/60612-unexpected.cc | 1 -
70 .../testsuite/18_support/exception_ptr/62258.cc | 1 -
71 .../testsuite/18_support/exception_ptr/64241.cc | 1 -
72 .../18_support/exception_ptr/current_exception.cc | 1 -
73 .../testsuite/18_support/exception_ptr/lifespan.cc | 1 -
74 .../18_support/exception_ptr/make_exception_ptr.cc | 1 -
75 .../testsuite/18_support/exception_ptr/move.cc | 1 -
76 .../18_support/exception_ptr/requirements.cc | 1 -
77 .../18_support/exception_ptr/requirements_neg.cc | 1 -
78 .../18_support/exception_ptr/rethrow_exception.cc | 1 -
79 .../testsuite/18_support/nested_exception/51438.cc | 1 -
80 .../testsuite/18_support/nested_exception/62154.cc | 1 -
81 .../testsuite/18_support/nested_exception/68139.cc | 1 -
82 .../testsuite/18_support/nested_exception/cons.cc | 1 -
83 .../18_support/nested_exception/nested_ptr.cc | 1 -
84 .../nested_exception/rethrow_if_nested.cc | 1 -
85 .../18_support/nested_exception/rethrow_nested.cc | 1 -
86 .../nested_exception/throw_with_nested.cc | 1 -
87 libstdc++-v3/testsuite/30_threads/async/42819.cc | 1 -
88 libstdc++-v3/testsuite/30_threads/async/49668.cc | 1 -
89 libstdc++-v3/testsuite/30_threads/async/54297.cc | 1 -
90 libstdc++-v3/testsuite/30_threads/async/any.cc | 1 -
91 libstdc++-v3/testsuite/30_threads/async/async.cc | 1 -
92 libstdc++-v3/testsuite/30_threads/async/except.cc | 1 -
93 .../testsuite/30_threads/async/forced_unwind.cc | 1 -
94 libstdc++-v3/testsuite/30_threads/async/launch.cc | 1 -
95 libstdc++-v3/testsuite/30_threads/async/lwg2021.cc | 1 -
96 libstdc++-v3/testsuite/30_threads/async/sync.cc | 1 -
97 .../testsuite/30_threads/future/cons/assign_neg.cc | 1 -
98 .../testsuite/30_threads/future/cons/constexpr.cc | 1 -
99 .../testsuite/30_threads/future/cons/copy_neg.cc | 1 -
100 .../testsuite/30_threads/future/cons/default.cc | 1 -
101 .../testsuite/30_threads/future/cons/move.cc | 1 -
102 .../30_threads/future/cons/move_assign.cc | 1 -
103 .../testsuite/30_threads/future/members/45133.cc | 1 -
104 .../testsuite/30_threads/future/members/get.cc | 1 -
105 .../testsuite/30_threads/future/members/get2.cc | 1 -
106 .../testsuite/30_threads/future/members/share.cc | 1 -
107 .../testsuite/30_threads/future/members/valid.cc | 1 -
108 .../testsuite/30_threads/future/members/wait.cc | 1 -
109 .../30_threads/future/members/wait_for.cc | 1 -
110 .../30_threads/future/members/wait_until.cc | 1 -
111 .../future/requirements/explicit_instantiation.cc | 1 -
112 .../30_threads/headers/future/types_std_c++0x.cc | 1 -
113 .../testsuite/30_threads/packaged_task/49668.cc | 1 -
114 .../testsuite/30_threads/packaged_task/60564.cc | 1 -
115 .../testsuite/30_threads/packaged_task/cons/1.cc | 1 -
116 .../testsuite/30_threads/packaged_task/cons/2.cc | 1 -
117 .../testsuite/30_threads/packaged_task/cons/3.cc | 1 -
118 .../30_threads/packaged_task/cons/56492.cc | 1 -
119 .../30_threads/packaged_task/cons/alloc.cc | 1 -
120 .../30_threads/packaged_task/cons/alloc2.cc | 1 -
121 .../30_threads/packaged_task/cons/alloc_min.cc | 1 -
122 .../30_threads/packaged_task/cons/assign_neg.cc | 1 -
123 .../30_threads/packaged_task/cons/copy_neg.cc | 1 -
124 .../30_threads/packaged_task/cons/move.cc | 1 -
125 .../30_threads/packaged_task/cons/move_assign.cc | 1 -
126 .../30_threads/packaged_task/forced_unwind.cc | 1 -
127 .../packaged_task/members/at_thread_exit.cc | 1 -
128 .../30_threads/packaged_task/members/get_future.cc | 1 -
129 .../packaged_task/members/get_future2.cc | 1 -
130 .../30_threads/packaged_task/members/invoke.cc | 1 -
131 .../30_threads/packaged_task/members/invoke2.cc | 1 -
132 .../30_threads/packaged_task/members/invoke3.cc | 1 -
133 .../30_threads/packaged_task/members/invoke4.cc | 1 -
134 .../30_threads/packaged_task/members/invoke5.cc | 1 -
135 .../30_threads/packaged_task/members/reset.cc | 1 -
136 .../30_threads/packaged_task/members/reset2.cc | 1 -
137 .../30_threads/packaged_task/members/swap.cc | 1 -
138 .../30_threads/packaged_task/members/valid.cc | 1 -
139 .../requirements/explicit_instantiation.cc | 1 -
140 .../30_threads/packaged_task/uses_allocator.cc | 1 -
141 libstdc++-v3/testsuite/30_threads/promise/60966.cc | 1 -
142 libstdc++-v3/testsuite/30_threads/promise/69106.cc | 1 -
143 .../testsuite/30_threads/promise/cons/1.cc | 1 -
144 .../testsuite/30_threads/promise/cons/alloc.cc | 1 -
145 .../testsuite/30_threads/promise/cons/alloc2.cc | 1 -
146 .../testsuite/30_threads/promise/cons/alloc_min.cc | 1 -
147 .../30_threads/promise/cons/assign_neg.cc | 1 -
148 .../testsuite/30_threads/promise/cons/copy_neg.cc | 1 -
149 .../testsuite/30_threads/promise/cons/move.cc | 1 -
150 .../30_threads/promise/cons/move_assign.cc | 1 -
151 .../30_threads/promise/members/at_thread_exit.cc | 1 -
152 .../30_threads/promise/members/get_future.cc | 1 -
153 .../30_threads/promise/members/get_future2.cc | 1 -
154 .../30_threads/promise/members/set_exception.cc | 1 -
155 .../30_threads/promise/members/set_exception2.cc | 1 -
156 .../30_threads/promise/members/set_value.cc | 1 -
157 .../30_threads/promise/members/set_value2.cc | 1 -
158 .../30_threads/promise/members/set_value3.cc | 1 -
159 .../testsuite/30_threads/promise/members/swap.cc | 1 -
160 .../promise/requirements/explicit_instantiation.cc | 1 -
161 .../testsuite/30_threads/promise/uses_allocator.cc | 1 -
162 .../30_threads/shared_future/cons/assign.cc | 1 -
163 .../30_threads/shared_future/cons/constexpr.cc | 1 -
164 .../30_threads/shared_future/cons/copy.cc | 1 -
165 .../30_threads/shared_future/cons/default.cc | 1 -
166 .../30_threads/shared_future/cons/move.cc | 1 -
167 .../30_threads/shared_future/cons/move_assign.cc | 1 -
168 .../30_threads/shared_future/members/45133.cc | 1 -
169 .../30_threads/shared_future/members/get.cc | 1 -
170 .../30_threads/shared_future/members/get2.cc | 1 -
171 .../30_threads/shared_future/members/valid.cc | 1 -
172 .../30_threads/shared_future/members/wait.cc | 1 -
173 .../30_threads/shared_future/members/wait_for.cc | 1 -
174 .../30_threads/shared_future/members/wait_until.cc | 1 -
175 .../requirements/explicit_instantiation.cc | 1 -
176 126 files changed, 236 insertions(+), 144 deletions(-)
177 create mode 100644 libstdc++-v3/libsupc++/eh_atomics.h
178
179
180Index: gcc-6.3.0/libstdc++-v3/acinclude.m4
181===================================================================
182--- gcc-6.3.0.orig/libstdc++-v3/acinclude.m4
183+++ gcc-6.3.0/libstdc++-v3/acinclude.m4
184@@ -4517,6 +4517,43 @@ AC_DEFUN([GLIBCXX_CHECK_SIZE_T_MANGLING]
185 [Define to the letter to which size_t is mangled.])
186 ])
187
188+dnl
189+dnl Determine whether std::exception_ptr symbols should be exported with
190+dnl the symbol versions from GCC 4.6.0 or GCC 7.1.0, depending on which
191+dnl release first added support for std::exception_ptr. Originally it was
192+dnl only supported for targets with always-lock-free atomics for int, but
193+dnl since GCC 7.1 it is supported for all targets.
194+dnl
195+AC_DEFUN([GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER], [
196+ if test $enable_symvers != no; then
197+ AC_MSG_CHECKING([for first version to support std::exception_ptr])
198+ case ${target} in
199+ aarch64-*-* | alpha-*-* | hppa*-*-* | i?86-*-* | x86_64-*-* | \
200+ m68k-*-* | powerpc*-*-* | s390*-*-* | *-*-solaris* )
201+ ac_exception_ptr_since_gcc46=yes
202+ ;;
203+ *)
204+ # If the value of this macro changes then we will need to hardcode
205+ # yes/no here for additional targets based on the original value.
206+ AC_TRY_COMPILE([], [
207+ #if __GCC_ATOMIC_INT_LOCK_FREE <= 1
208+ # error atomic int not always lock free
209+ #endif
210+ ],
211+ [ac_exception_ptr_since_gcc46=yes],
212+ [ac_exception_ptr_since_gcc46=no])
213+ ;;
214+ esac
215+ if test x"$ac_exception_ptr_since_gcc46" = x"yes" ; then
216+ AC_DEFINE(HAVE_EXCEPTION_PTR_SINCE_GCC46, 1,
217+ [Define to 1 if GCC 4.6 supported std::exception_ptr for the target])
218+ AC_MSG_RESULT([4.6.0])
219+ else
220+ AC_MSG_RESULT([7.1.0])
221+ fi
222+ fi
223+])
224+
225 # Macros from the top-level gcc directory.
226 m4_include([../config/gc++filt.m4])
227 m4_include([../config/tls.m4])
228Index: gcc-6.3.0/libstdc++-v3/config.h.in
229===================================================================
230--- gcc-6.3.0.orig/libstdc++-v3/config.h.in
231+++ gcc-6.3.0/libstdc++-v3/config.h.in
232@@ -120,6 +120,9 @@
233 /* Define if EWOULDBLOCK exists. */
234 #undef HAVE_EWOULDBLOCK
235
236+/* Define to 1 if GCC 4.6 supported std::exception_ptr for the target */
237+#undef HAVE_EXCEPTION_PTR_SINCE_GCC46
238+
239 /* Define to 1 if you have the <execinfo.h> header file. */
240 #undef HAVE_EXECINFO_H
241
242Index: gcc-6.3.0/libstdc++-v3/config/abi/pre/gnu.ver
243===================================================================
244--- gcc-6.3.0.orig/libstdc++-v3/config/abi/pre/gnu.ver
245+++ gcc-6.3.0/libstdc++-v3/config/abi/pre/gnu.ver
246@@ -1490,6 +1490,9 @@ GLIBCXX_3.4.15 {
247 _ZNSt14error_categoryC*;
248 _ZNSt14error_categoryD*;
249
250+#ifdef HAVE_EXCEPTION_PTR_SINCE_GCC46
251+ # std::future symbols are only present in this version when
252+ # atomic operations on int are always lock-free.
253 _ZNSt13__future_base12_Result_baseC*;
254 _ZNSt13__future_base12_Result_baseD*;
255 _ZTINSt13__future_base12_Result_baseE;
256@@ -1498,6 +1501,7 @@ GLIBCXX_3.4.15 {
257 _ZNSt13__future_base11_State_baseD*;
258 _ZTINSt13__future_base11_State_baseE;
259 _ZTVNSt13__future_base11_State_baseE;
260+#endif
261
262 } GLIBCXX_3.4.14;
263
264@@ -1674,8 +1678,10 @@ GLIBCXX_3.4.21 {
265
266 # std::notify_all_at_thread_exit
267 _ZSt25notify_all_at_thread_exitRSt18condition_variableSt11unique_lockISt5mutexE;
268+#ifdef HAVE_EXCEPTION_PTR_SINCE_GCC46
269 # std::__future_base::_State_baseV2::_Make_ready::_M_set()
270 _ZNSt13__future_base13_State_baseV211_Make_ready6_M_setEv;
271+#endif
272
273 # ABI-tagged std::basic_string
274 _ZNSt7__cxx1112basic_string*;
275@@ -2040,6 +2046,7 @@ CXXABI_1.3.3 {
276 _ZTIPDi;
277 _ZTIPKDi;
278
279+#ifdef HAVE_EXCEPTION_PTR_SINCE_GCC46
280 # exception_ptr
281 _ZNSt15__exception_ptr13exception_ptrC1Ev;
282 _ZNSt15__exception_ptr13exception_ptrC2Ev;
283@@ -2059,6 +2066,7 @@ CXXABI_1.3.3 {
284
285 _ZSt17current_exceptionv;
286 _ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE;
287+#endif
288
289 } CXXABI_1.3.2;
290
291@@ -2089,10 +2097,12 @@ CXXABI_1.3.5 {
292 # FNV hash.
293 _ZSt15_Fnv_hash_bytesPKv*;
294
295+#ifdef HAVE_EXCEPTION_PTR_SINCE_GCC46
296 # std::nested_exception
297 _ZNSt16nested_exceptionD*;
298 _ZTISt16nested_exception;
299 _ZTVSt16nested_exception;
300+#endif
301
302 } CXXABI_1.3.4;
303
304Index: gcc-6.3.0/libstdc++-v3/configure
305===================================================================
306--- gcc-6.3.0.orig/libstdc++-v3/configure
307+++ gcc-6.3.0/libstdc++-v3/configure
308@@ -80655,6 +80655,55 @@ _ACEOF
309
310
311
312+# Check which release added std::exception_ptr for the target
313+
314+ if test $enable_symvers != no; then
315+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for first version to support std::exception_ptr" >&5
316+$as_echo_n "checking for first version to support std::exception_ptr... " >&6; }
317+ case ${target} in
318+ aarch64-*-* | alpha-*-* | hppa*-*-* | i?86-*-* | x86_64-*-* | \
319+ m68k-*-* | powerpc*-*-* | s390*-*-* | *-*-solaris* )
320+ ac_exception_ptr_since_gcc46=yes
321+ ;;
322+ *)
323+ # If the value of this macro changes then we will need to hardcode
324+ # yes/no here for additional targets based on the original value.
325+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
326+/* end confdefs.h. */
327+
328+int
329+main ()
330+{
331+
332+ #if __GCC_ATOMIC_INT_LOCK_FREE <= 1
333+ # error atomic int not always lock free
334+ #endif
335+
336+ ;
337+ return 0;
338+}
339+_ACEOF
340+if ac_fn_c_try_compile "$LINENO"; then :
341+ ac_exception_ptr_since_gcc46=yes
342+else
343+ ac_exception_ptr_since_gcc46=no
344+fi
345+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
346+ ;;
347+ esac
348+ if test x"$ac_exception_ptr_since_gcc46" = x"yes" ; then
349+
350+$as_echo "#define HAVE_EXCEPTION_PTR_SINCE_GCC46 1" >>confdefs.h
351+
352+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 4.6.0" >&5
353+$as_echo "4.6.0" >&6; }
354+ else
355+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 7.1.0" >&5
356+$as_echo "7.1.0" >&6; }
357+ fi
358+ fi
359+
360+
361 # Define documentation rules conditionally.
362
363 # See if makeinfo has been installed and is modern enough
364Index: gcc-6.3.0/libstdc++-v3/configure.ac
365===================================================================
366--- gcc-6.3.0.orig/libstdc++-v3/configure.ac
367+++ gcc-6.3.0/libstdc++-v3/configure.ac
368@@ -411,6 +411,9 @@ GLIBCXX_CHECK_FILESYSTEM_DEPS
369 # For Transactional Memory TS
370 GLIBCXX_CHECK_SIZE_T_MANGLING
371
372+# Check which release added std::exception_ptr for the target
373+GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER
374+
375 # Define documentation rules conditionally.
376
377 # See if makeinfo has been installed and is modern enough
378Index: gcc-6.3.0/libstdc++-v3/include/std/future
379===================================================================
380--- gcc-6.3.0.orig/libstdc++-v3/include/std/future
381+++ gcc-6.3.0/libstdc++-v3/include/std/future
382@@ -182,8 +182,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
383 future<__async_result_of<_Fn, _Args...>>
384 async(_Fn&& __fn, _Args&&... __args);
385
386-#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
387- && (ATOMIC_INT_LOCK_FREE > 1)
388+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
389
390 /// Base class and enclosing scope.
391 struct __future_base
392@@ -1745,7 +1744,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
393
394 #endif // _GLIBCXX_ASYNC_ABI_COMPAT
395 #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
396- // && ATOMIC_INT_LOCK_FREE
397
398 // @} group futures
399 _GLIBCXX_END_NAMESPACE_VERSION
400Index: gcc-6.3.0/libstdc++-v3/libsupc++/eh_atomics.h
401===================================================================
402--- /dev/null
403+++ gcc-6.3.0/libstdc++-v3/libsupc++/eh_atomics.h
404@@ -0,0 +1,84 @@
405+// Exception Handling support header for -*- C++ -*-
406+
407+// Copyright (C) 2016 Free Software Foundation, Inc.
408+//
409+// This file is part of GCC.
410+//
411+// GCC is free software; you can redistribute it and/or modify
412+// it under the terms of the GNU General Public License as published by
413+// the Free Software Foundation; either version 3, or (at your option)
414+// any later version.
415+//
416+// GCC is distributed in the hope that it will be useful,
417+// but WITHOUT ANY WARRANTY; without even the implied warranty of
418+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
419+// GNU General Public License for more details.
420+//
421+// Under Section 7 of GPL version 3, you are granted additional
422+// permissions described in the GCC Runtime Library Exception, version
423+// 3.1, as published by the Free Software Foundation.
424+
425+// You should have received a copy of the GNU General Public License and
426+// a copy of the GCC Runtime Library Exception along with this program;
427+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
428+// <http://www.gnu.org/licenses/>.
429+
430+/** @file eh_atomics.h
431+ * This is an internal header file, included by library source files.
432+ * Do not attempt to use it directly.
433+ */
434+
435+#ifndef _EH_ATOMICS_H
436+#define _EH_ATOMICS_H 1
437+
438+#include <bits/c++config.h>
439+#include <bits/atomic_word.h>
440+#include <bits/atomic_lockfree_defines.h>
441+#if ATOMIC_INT_LOCK_FREE <= 1
442+# include <ext/atomicity.h>
443+#endif
444+
445+#pragma GCC visibility push(default)
446+extern "C++" {
447+namespace __gnu_cxx
448+{
449+ void
450+ __eh_atomic_inc (_Atomic_word* __count) __attribute__((always_inline));
451+
452+ bool
453+ __eh_atomic_dec (_Atomic_word* __count) __attribute__((always_inline));
454+
455+ // Increments the count.
456+ inline void
457+ __eh_atomic_inc (_Atomic_word* __count)
458+ {
459+#if ATOMIC_INT_LOCK_FREE > 1
460+ __atomic_add_fetch (__count, 1, __ATOMIC_ACQ_REL);
461+#else
462+ _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE (__count);
463+ __gnu_cxx::__atomic_add_dispatch (__count, 1);
464+ _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER (__count);
465+#endif
466+ }
467+
468+ // Decrements the count and returns true if it reached zero.
469+ inline bool
470+ __eh_atomic_dec (_Atomic_word* __count)
471+ {
472+#if ATOMIC_INT_LOCK_FREE > 1
473+ return __atomic_sub_fetch (__count, 1, __ATOMIC_ACQ_REL) == 0;
474+#else
475+ _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE (__count);
476+ if (__gnu_cxx::__exchange_and_add_dispatch (__count, -1) == 1)
477+ {
478+ _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER (__count);
479+ return true;
480+ }
481+ return false;
482+#endif
483+ }
484+} // namespace __gnu_cxx
485+}
486+#pragma GCC visibility pop
487+
488+#endif // _EH_ATOMICS_H
489Index: gcc-6.3.0/libstdc++-v3/libsupc++/eh_ptr.cc
490===================================================================
491--- gcc-6.3.0.orig/libstdc++-v3/libsupc++/eh_ptr.cc
492+++ gcc-6.3.0/libstdc++-v3/libsupc++/eh_ptr.cc
493@@ -23,9 +23,7 @@
494 // <http://www.gnu.org/licenses/>.
495
496 #include <bits/c++config.h>
497-#include <bits/atomic_lockfree_defines.h>
498-
499-#if ATOMIC_INT_LOCK_FREE > 1
500+#include "eh_atomics.h"
501
502 #define _GLIBCXX_EH_PTR_COMPAT
503
504@@ -103,7 +101,7 @@ std::__exception_ptr::exception_ptr::_M_
505 {
506 __cxa_refcounted_exception *eh =
507 __get_refcounted_exception_header_from_obj (_M_exception_object);
508- __atomic_add_fetch (&eh->referenceCount, 1, __ATOMIC_ACQ_REL);
509+ __gnu_cxx::__eh_atomic_inc (&eh->referenceCount);
510 }
511 }
512
513@@ -115,7 +113,7 @@ std::__exception_ptr::exception_ptr::_M_
514 {
515 __cxa_refcounted_exception *eh =
516 __get_refcounted_exception_header_from_obj (_M_exception_object);
517- if (__atomic_sub_fetch (&eh->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
518+ if (__gnu_cxx::__eh_atomic_dec (&eh->referenceCount))
519 {
520 if (eh->exc.exceptionDestructor)
521 eh->exc.exceptionDestructor (_M_exception_object);
522@@ -219,7 +217,7 @@ __gxx_dependent_exception_cleanup(_Unwin
523
524 __cxa_free_dependent_exception (dep);
525
526- if (__atomic_sub_fetch (&header->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
527+ if (__gnu_cxx::__eh_atomic_dec (&header->referenceCount))
528 {
529 if (header->exc.exceptionDestructor)
530 header->exc.exceptionDestructor (header + 1);
531@@ -238,7 +236,7 @@ std::rethrow_exception(std::exception_pt
532
533 __cxa_dependent_exception *dep = __cxa_allocate_dependent_exception ();
534 dep->primaryException = obj;
535- __atomic_add_fetch (&eh->referenceCount, 1, __ATOMIC_ACQ_REL);
536+ __gnu_cxx::__eh_atomic_inc (&eh->referenceCount);
537
538 dep->unexpectedHandler = get_unexpected ();
539 dep->terminateHandler = get_terminate ();
540@@ -260,5 +258,3 @@ std::rethrow_exception(std::exception_pt
541 }
542
543 #undef _GLIBCXX_EH_PTR_COMPAT
544-
545-#endif
546Index: gcc-6.3.0/libstdc++-v3/libsupc++/eh_throw.cc
547===================================================================
548--- gcc-6.3.0.orig/libstdc++-v3/libsupc++/eh_throw.cc
549+++ gcc-6.3.0/libstdc++-v3/libsupc++/eh_throw.cc
550@@ -24,6 +24,7 @@
551
552 #include <bits/c++config.h>
553 #include "unwind-cxx.h"
554+#include "eh_atomics.h"
555
556 using namespace __cxxabiv1;
557
558@@ -42,17 +43,13 @@ __gxx_exception_cleanup (_Unwind_Reason_
559 if (code != _URC_FOREIGN_EXCEPTION_CAUGHT && code != _URC_NO_REASON)
560 __terminate (header->exc.terminateHandler);
561
562-#if ATOMIC_INT_LOCK_FREE > 1
563- if (__atomic_sub_fetch (&header->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
564+ if (__gnu_cxx::__eh_atomic_dec (&header->referenceCount))
565 {
566-#endif
567 if (header->exc.exceptionDestructor)
568 header->exc.exceptionDestructor (header + 1);
569
570 __cxa_free_exception (header + 1);
571-#if ATOMIC_INT_LOCK_FREE > 1
572 }
573-#endif
574 }
575
576
577Index: gcc-6.3.0/libstdc++-v3/libsupc++/eh_tm.cc
578===================================================================
579--- gcc-6.3.0.orig/libstdc++-v3/libsupc++/eh_tm.cc
580+++ gcc-6.3.0/libstdc++-v3/libsupc++/eh_tm.cc
581@@ -24,6 +24,7 @@
582
583 #include <cstdlib>
584 #include "unwind-cxx.h"
585+#include "eh_atomics.h"
586
587 using namespace __cxxabiv1;
588
589@@ -45,9 +46,7 @@ free_any_cxa_exception (_Unwind_Exceptio
590 __cxa_free_dependent_exception (dep);
591 }
592
593-#if __GCC_ATOMIC_INT_LOCK_FREE > 1
594- if (__atomic_sub_fetch (&h->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
595-#endif
596+ if (__gnu_cxx::__eh_atomic_dec (&h->referenceCount))
597 __cxa_free_exception (h + 1);
598 }
599
600Index: gcc-6.3.0/libstdc++-v3/libsupc++/exception
601===================================================================
602--- gcc-6.3.0.orig/libstdc++-v3/libsupc++/exception
603+++ gcc-6.3.0/libstdc++-v3/libsupc++/exception
604@@ -35,7 +35,6 @@
605 #pragma GCC visibility push(default)
606
607 #include <bits/c++config.h>
608-#include <bits/atomic_lockfree_defines.h>
609
610 extern "C++" {
611
612@@ -166,7 +165,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
613
614 #pragma GCC visibility pop
615
616-#if (__cplusplus >= 201103L) && (ATOMIC_INT_LOCK_FREE > 1)
617+#if (__cplusplus >= 201103L)
618 #include <bits/exception_ptr.h>
619 #include <bits/nested_exception.h>
620 #endif
621Index: gcc-6.3.0/libstdc++-v3/libsupc++/exception_ptr.h
622===================================================================
623--- gcc-6.3.0.orig/libstdc++-v3/libsupc++/exception_ptr.h
624+++ gcc-6.3.0/libstdc++-v3/libsupc++/exception_ptr.h
625@@ -36,10 +36,6 @@
626 #include <bits/c++config.h>
627 #include <bits/exception_defines.h>
628
629-#if ATOMIC_INT_LOCK_FREE < 2
630-# error This platform does not support exception propagation.
631-#endif
632-
633 extern "C++" {
634
635 namespace std
636Index: gcc-6.3.0/libstdc++-v3/libsupc++/guard.cc
637===================================================================
638--- gcc-6.3.0.orig/libstdc++-v3/libsupc++/guard.cc
639+++ gcc-6.3.0/libstdc++-v3/libsupc++/guard.cc
640@@ -30,6 +30,7 @@
641 #include <new>
642 #include <ext/atomicity.h>
643 #include <ext/concurrence.h>
644+#include <bits/atomic_lockfree_defines.h>
645 #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
646 && (ATOMIC_INT_LOCK_FREE > 1) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
647 # include <climits>
648Index: gcc-6.3.0/libstdc++-v3/libsupc++/nested_exception.cc
649===================================================================
650--- gcc-6.3.0.orig/libstdc++-v3/libsupc++/nested_exception.cc
651+++ gcc-6.3.0/libstdc++-v3/libsupc++/nested_exception.cc
652@@ -25,7 +25,5 @@
653
654 namespace std
655 {
656-#if ATOMIC_INT_LOCK_FREE > 1
657 nested_exception::~nested_exception() noexcept = default;
658-#endif
659 } // namespace std
660Index: gcc-6.3.0/libstdc++-v3/libsupc++/nested_exception.h
661===================================================================
662--- gcc-6.3.0.orig/libstdc++-v3/libsupc++/nested_exception.h
663+++ gcc-6.3.0/libstdc++-v3/libsupc++/nested_exception.h
664@@ -39,10 +39,6 @@
665 #include <bits/c++config.h>
666 #include <bits/move.h>
667
668-#if ATOMIC_INT_LOCK_FREE < 2
669-# error This platform does not support exception propagation.
670-#endif
671-
672 extern "C++" {
673
674 namespace std
675Index: gcc-6.3.0/libstdc++-v3/src/c++11/future.cc
676===================================================================
677--- gcc-6.3.0.orig/libstdc++-v3/src/c++11/future.cc
678+++ gcc-6.3.0/libstdc++-v3/src/c++11/future.cc
679@@ -78,8 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
680 const char*
681 future_error::what() const noexcept { return logic_error::what(); }
682
683-#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
684- && (ATOMIC_INT_LOCK_FREE > 1)
685+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
686 __future_base::_Result_base::_Result_base() = default;
687
688 __future_base::_Result_base::~_Result_base() = default;
689Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
690===================================================================
691--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
692+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/40296.cc
693@@ -1,6 +1,5 @@
694 // { dg-do compile }
695 // { dg-options "-std=gnu++11" }
696-// { dg-require-atomic-builtins "" }
697
698 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
699 //
700Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
701===================================================================
702--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
703+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/60612-terminate.cc
704@@ -1,5 +1,4 @@
705 // { dg-options "-std=gnu++11" }
706-// { dg-require-atomic-builtins "" }
707
708 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
709 //
710Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
711===================================================================
712--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
713+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/60612-unexpected.cc
714@@ -1,5 +1,4 @@
715 // { dg-options "-std=gnu++11" }
716-// { dg-require-atomic-builtins "" }
717
718 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
719 //
720Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
721===================================================================
722--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
723+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/62258.cc
724@@ -1,5 +1,4 @@
725 // { dg-options "-std=gnu++11" }
726-// { dg-require-atomic-builtins "" }
727
728 // Copyright (C) 2015-2016 Free Software Foundation, Inc.
729 //
730Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
731===================================================================
732--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
733+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc
734@@ -16,7 +16,6 @@
735 // <http://www.gnu.org/licenses/>.
736
737 // { dg-options "-std=gnu++11 -fno-exceptions -O0" }
738-// { dg-require-atomic-builtins "" }
739
740 #include <exception>
741 #include <testsuite_hooks.h>
742Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
743===================================================================
744--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
745+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc
746@@ -1,5 +1,4 @@
747 // { dg-options "-std=gnu++11" }
748-// { dg-require-atomic-builtins "" }
749
750 // 2008-05-25 Sebastian Redl <sebastian.redl@getdesigned.at>
751
752Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
753===================================================================
754--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
755+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
756@@ -1,5 +1,4 @@
757 // { dg-options "-std=gnu++11" }
758-// { dg-require-atomic-builtins "" }
759
760 // 2008-05-25 Sebastian Redl <sebastian.redl@getdesigned.at>
761
762Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
763===================================================================
764--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
765+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc
766@@ -1,5 +1,4 @@
767 // { dg-options "-std=gnu++11" }
768-// { dg-require-atomic-builtins "" }
769
770 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
771 //
772Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
773===================================================================
774--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
775+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/move.cc
776@@ -1,5 +1,4 @@
777 // { dg-options "-std=gnu++11" }
778-// { dg-require-atomic-builtins "" }
779
780 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
781 //
782Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
783===================================================================
784--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
785+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/requirements.cc
786@@ -1,5 +1,4 @@
787 // { dg-options "-std=gnu++11" }
788-// { dg-require-atomic-builtins "" }
789
790 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
791 //
792Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
793===================================================================
794--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
795+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/requirements_neg.cc
796@@ -1,6 +1,5 @@
797 // { dg-do compile }
798 // { dg-options "-std=gnu++11" }
799-// { dg-require-atomic-builtins "" }
800
801 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
802 //
803Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
804===================================================================
805--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
806+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc
807@@ -1,5 +1,4 @@
808 // { dg-options "-std=gnu++11" }
809-// { dg-require-atomic-builtins "" }
810
811 // 2008-05-25 Sebastian Redl <sebastian.redl@getdesigned.at>
812
813Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
814===================================================================
815--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
816+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/51438.cc
817@@ -1,6 +1,5 @@
818 // { dg-do compile }
819 // { dg-options "-std=gnu++11" }
820-// { dg-require-atomic-builtins "" }
821
822 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
823 //
824Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
825===================================================================
826--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
827+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
828@@ -1,5 +1,4 @@
829 // { dg-options "-std=gnu++11" }
830-// { dg-require-atomic-builtins "" }
831
832 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
833 //
834Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
835===================================================================
836--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
837+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
838@@ -1,6 +1,5 @@
839 // { dg-do compile }
840 // { dg-options "-std=gnu++11" }
841-// { dg-require-atomic-builtins "" }
842
843 // Copyright (C) 2015-2016 Free Software Foundation, Inc.
844 //
845Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
846===================================================================
847--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
848+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc
849@@ -1,5 +1,4 @@
850 // { dg-options "-std=gnu++11" }
851-// { dg-require-atomic-builtins "" }
852
853 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
854 //
855Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
856===================================================================
857--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
858+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc
859@@ -1,5 +1,4 @@
860 // { dg-options "-std=gnu++11" }
861-// { dg-require-atomic-builtins "" }
862
863 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
864 //
865Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
866===================================================================
867--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
868+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc
869@@ -1,5 +1,4 @@
870 // { dg-options "-std=gnu++11" }
871-// { dg-require-atomic-builtins "" }
872
873 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
874 //
875Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
876===================================================================
877--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
878+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc
879@@ -1,5 +1,4 @@
880 // { dg-options "-std=gnu++11" }
881-// { dg-require-atomic-builtins "" }
882
883 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
884 //
885Index: gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
886===================================================================
887--- gcc-6.3.0.orig/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
888+++ gcc-6.3.0/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc
889@@ -1,5 +1,4 @@
890 // { dg-options "-std=gnu++11" }
891-// { dg-require-atomic-builtins "" }
892
893 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
894 //
895Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/42819.cc
896===================================================================
897--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/async/42819.cc
898+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/42819.cc
899@@ -4,7 +4,6 @@
900 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
901 // { dg-require-cstdint "" }
902 // { dg-require-gthreads "" }
903-// { dg-require-atomic-builtins "" }
904
905 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
906 //
907Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/49668.cc
908===================================================================
909--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/async/49668.cc
910+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/49668.cc
911@@ -4,7 +4,6 @@
912 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
913 // { dg-require-cstdint "" }
914 // { dg-require-gthreads "" }
915-// { dg-require-atomic-builtins "" }
916
917 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
918 //
919Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/54297.cc
920===================================================================
921--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/async/54297.cc
922+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/54297.cc
923@@ -4,7 +4,6 @@
924 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
925 // { dg-require-cstdint "" }
926 // { dg-require-gthreads "" }
927-// { dg-require-atomic-builtins "" }
928 // { dg-require-sleep "" }
929
930 // Copyright (C) 2012-2016 Free Software Foundation, Inc.
931Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/any.cc
932===================================================================
933--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/async/any.cc
934+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/any.cc
935@@ -4,7 +4,6 @@
936 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
937 // { dg-require-cstdint "" }
938 // { dg-require-gthreads "" }
939-// { dg-require-atomic-builtins "" }
940
941 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
942 //
943Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/async.cc
944===================================================================
945--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/async/async.cc
946+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/async.cc
947@@ -4,7 +4,6 @@
948 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
949 // { dg-require-cstdint "" }
950 // { dg-require-gthreads "" }
951-// { dg-require-atomic-builtins "" }
952
953 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
954 //
955Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/except.cc
956===================================================================
957--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/async/except.cc
958+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/except.cc
959@@ -4,7 +4,6 @@
960 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
961 // { dg-require-cstdint "" }
962 // { dg-require-gthreads "" }
963-// { dg-require-atomic-builtins "" }
964
965 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
966 //
967Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
968===================================================================
969--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
970+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/forced_unwind.cc
971@@ -2,7 +2,6 @@
972 // { dg-options " -std=gnu++11 -pthread" { target *-*-linux* *-*-gnu* } }
973 // { dg-require-cstdint "" }
974 // { dg-require-gthreads "" }
975-// { dg-require-atomic-builtins "" }
976
977 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
978 //
979Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/launch.cc
980===================================================================
981--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/async/launch.cc
982+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/launch.cc
983@@ -4,7 +4,6 @@
984 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
985 // { dg-require-cstdint "" }
986 // { dg-require-gthreads "" }
987-// { dg-require-atomic-builtins "" }
988
989 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
990 //
991Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
992===================================================================
993--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
994+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
995@@ -21,7 +21,6 @@
996 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
997 // { dg-require-cstdint "" }
998 // { dg-require-gthreads "" }
999-// { dg-require-atomic-builtins "" }
1000
1001 // LWG 2021. Further incorrect usages of result_of
1002 // Arguments to result_of should use decay.
1003Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/sync.cc
1004===================================================================
1005--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/async/sync.cc
1006+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/async/sync.cc
1007@@ -4,7 +4,6 @@
1008 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1009 // { dg-require-cstdint "" }
1010 // { dg-require-gthreads "" }
1011-// { dg-require-atomic-builtins "" }
1012
1013 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
1014 //
1015Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
1016===================================================================
1017--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
1018+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
1019@@ -2,7 +2,6 @@
1020 // { dg-options "-std=gnu++11" }
1021 // { dg-require-cstdint "" }
1022 // { dg-require-gthreads "" }
1023-// { dg-require-atomic-builtins "" }
1024
1025 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1026 //
1027Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
1028===================================================================
1029--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
1030+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/cons/constexpr.cc
1031@@ -2,7 +2,6 @@
1032 // { dg-options "-std=gnu++11 -fno-inline -g0" }
1033 // { dg-require-cstdint "" }
1034 // { dg-require-gthreads "" }
1035-// { dg-require-atomic-builtins "" }
1036 // { dg-final { scan-assembler-not "_ZNSt6futureIvEC2Ev" } }
1037 // { dg-final { scan-assembler-not "_ZNSt6futureIiEC2Ev" } }
1038
1039Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
1040===================================================================
1041--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
1042+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/cons/copy_neg.cc
1043@@ -2,7 +2,6 @@
1044 // { dg-options "-std=gnu++11" }
1045 // { dg-require-cstdint "" }
1046 // { dg-require-gthreads "" }
1047-// { dg-require-atomic-builtins "" }
1048
1049 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1050 //
1051Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
1052===================================================================
1053--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
1054+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/cons/default.cc
1055@@ -1,7 +1,6 @@
1056 // { dg-options "-std=gnu++11" }
1057 // { dg-require-cstdint "" }
1058 // { dg-require-gthreads "" }
1059-// { dg-require-atomic-builtins "" }
1060
1061 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
1062 //
1063Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
1064===================================================================
1065--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
1066+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
1067@@ -4,7 +4,6 @@
1068 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1069 // { dg-require-cstdint "" }
1070 // { dg-require-gthreads "" }
1071-// { dg-require-atomic-builtins "" }
1072
1073 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1074 //
1075Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
1076===================================================================
1077--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
1078+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/cons/move_assign.cc
1079@@ -1,7 +1,6 @@
1080 // { dg-options "-std=gnu++11" }
1081 // { dg-require-cstdint "" }
1082 // { dg-require-gthreads "" }
1083-// { dg-require-atomic-builtins "" }
1084
1085 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
1086 //
1087Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
1088===================================================================
1089--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
1090+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
1091@@ -4,7 +4,6 @@
1092 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1093 // { dg-require-cstdint "" }
1094 // { dg-require-gthreads "" }
1095-// { dg-require-atomic-builtins "" }
1096
1097 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
1098 //
1099Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/get.cc
1100===================================================================
1101--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/members/get.cc
1102+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/get.cc
1103@@ -4,7 +4,6 @@
1104 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1105 // { dg-require-cstdint "" }
1106 // { dg-require-gthreads "" }
1107-// { dg-require-atomic-builtins "" }
1108
1109 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1110 //
1111Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
1112===================================================================
1113--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
1114+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
1115@@ -4,7 +4,6 @@
1116 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1117 // { dg-require-cstdint "" }
1118 // { dg-require-gthreads "" }
1119-// { dg-require-atomic-builtins "" }
1120
1121 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1122 //
1123Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/share.cc
1124===================================================================
1125--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/members/share.cc
1126+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/share.cc
1127@@ -4,7 +4,6 @@
1128 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1129 // { dg-require-cstdint "" }
1130 // { dg-require-gthreads "" }
1131-// { dg-require-atomic-builtins "" }
1132
1133 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
1134 //
1135Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
1136===================================================================
1137--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
1138+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
1139@@ -4,7 +4,6 @@
1140 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1141 // { dg-require-cstdint "" }
1142 // { dg-require-gthreads "" }
1143-// { dg-require-atomic-builtins "" }
1144
1145 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
1146 //
1147Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
1148===================================================================
1149--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
1150+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
1151@@ -4,7 +4,6 @@
1152 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1153 // { dg-require-cstdint "" }
1154 // { dg-require-gthreads "" }
1155-// { dg-require-atomic-builtins "" }
1156
1157 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1158 //
1159Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
1160===================================================================
1161--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
1162+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
1163@@ -4,7 +4,6 @@
1164 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1165 // { dg-require-cstdint "" }
1166 // { dg-require-gthreads "" }
1167-// { dg-require-atomic-builtins "" }
1168
1169 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1170 //
1171Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
1172===================================================================
1173--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
1174+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
1175@@ -4,7 +4,6 @@
1176 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1177 // { dg-require-cstdint "" }
1178 // { dg-require-gthreads "" }
1179-// { dg-require-atomic-builtins "" }
1180
1181 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1182 //
1183Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
1184===================================================================
1185--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
1186+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/future/requirements/explicit_instantiation.cc
1187@@ -2,7 +2,6 @@
1188 // { dg-options "-std=gnu++11" }
1189 // { dg-require-cstdint "" }
1190 // { dg-require-gthreads "" }
1191-// { dg-require-atomic-builtins "" }
1192
1193 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1194 //
1195Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
1196===================================================================
1197--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
1198+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/headers/future/types_std_c++0x.cc
1199@@ -2,7 +2,6 @@
1200 // { dg-options "-std=gnu++11" }
1201 // { dg-require-cstdint "" }
1202 // { dg-require-gthreads "" }
1203-// { dg-require-atomic-builtins "" }
1204
1205 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1206 //
1207Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
1208===================================================================
1209--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
1210+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
1211@@ -4,7 +4,6 @@
1212 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1213 // { dg-require-cstdint "" }
1214 // { dg-require-gthreads "" }
1215-// { dg-require-atomic-builtins "" }
1216
1217 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
1218 //
1219Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
1220===================================================================
1221--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
1222+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
1223@@ -4,7 +4,6 @@
1224 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1225 // { dg-require-cstdint "" }
1226 // { dg-require-gthreads "" }
1227-// { dg-require-atomic-builtins "" }
1228
1229 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
1230 //
1231Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
1232===================================================================
1233--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
1234+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
1235@@ -4,7 +4,6 @@
1236 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1237 // { dg-require-cstdint "" }
1238 // { dg-require-gthreads "" }
1239-// { dg-require-atomic-builtins "" }
1240
1241 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1242 //
1243Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
1244===================================================================
1245--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
1246+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
1247@@ -4,7 +4,6 @@
1248 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1249 // { dg-require-cstdint "" }
1250 // { dg-require-gthreads "" }
1251-// { dg-require-atomic-builtins "" }
1252
1253 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1254 //
1255Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
1256===================================================================
1257--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
1258+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
1259@@ -4,7 +4,6 @@
1260 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1261 // { dg-require-cstdint "" }
1262 // { dg-require-gthreads "" }
1263-// { dg-require-atomic-builtins "" }
1264
1265 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
1266 //
1267Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
1268===================================================================
1269--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
1270+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
1271@@ -4,7 +4,6 @@
1272 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1273 // { dg-require-cstdint "" }
1274 // { dg-require-gthreads "" }
1275-// { dg-require-atomic-builtins "" }
1276
1277 // Copyright (C) 2013-2016 Free Software Foundation, Inc.
1278 //
1279Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
1280===================================================================
1281--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
1282+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
1283@@ -4,7 +4,6 @@
1284 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1285 // { dg-require-cstdint "" }
1286 // { dg-require-gthreads "" }
1287-// { dg-require-atomic-builtins "" }
1288
1289 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
1290 //
1291Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
1292===================================================================
1293--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
1294+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc2.cc
1295@@ -2,7 +2,6 @@
1296 // { dg-options "-std=gnu++11" }
1297 // { dg-require-cstdint "" }
1298 // { dg-require-gthreads "" }
1299-// { dg-require-atomic-builtins "" }
1300
1301 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
1302 //
1303Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
1304===================================================================
1305--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
1306+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc_min.cc
1307@@ -2,7 +2,6 @@
1308 // { dg-options "-std=gnu++11" }
1309 // { dg-require-cstdint "" }
1310 // { dg-require-gthreads "" }
1311-// { dg-require-atomic-builtins "" }
1312
1313 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
1314 //
1315Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
1316===================================================================
1317--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
1318+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
1319@@ -2,7 +2,6 @@
1320 // { dg-options "-std=gnu++11" }
1321 // { dg-require-cstdint "" }
1322 // { dg-require-gthreads "" }
1323-// { dg-require-atomic-builtins "" }
1324
1325 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1326 //
1327Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
1328===================================================================
1329--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
1330+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
1331@@ -2,7 +2,6 @@
1332 // { dg-options "-std=gnu++11" }
1333 // { dg-require-cstdint "" }
1334 // { dg-require-gthreads "" }
1335-// { dg-require-atomic-builtins "" }
1336
1337 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1338 //
1339Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
1340===================================================================
1341--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
1342+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
1343@@ -4,7 +4,6 @@
1344 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1345 // { dg-require-cstdint "" }
1346 // { dg-require-gthreads "" }
1347-// { dg-require-atomic-builtins "" }
1348
1349 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1350 //
1351Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
1352===================================================================
1353--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
1354+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
1355@@ -4,7 +4,6 @@
1356 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1357 // { dg-require-cstdint "" }
1358 // { dg-require-gthreads "" }
1359-// { dg-require-atomic-builtins "" }
1360
1361 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1362 //
1363Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
1364===================================================================
1365--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
1366+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/forced_unwind.cc
1367@@ -2,7 +2,6 @@
1368 // { dg-options " -std=gnu++11 -pthread" { target *-*-linux* *-*-gnu* } }
1369 // { dg-require-cstdint "" }
1370 // { dg-require-gthreads "" }
1371-// { dg-require-atomic-builtins "" }
1372
1373 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
1374 //
1375Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
1376===================================================================
1377--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
1378+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
1379@@ -4,7 +4,6 @@
1380 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1381 // { dg-require-cstdint "" }
1382 // { dg-require-gthreads "" }
1383-// { dg-require-atomic-builtins "" }
1384
1385 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
1386 //
1387Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
1388===================================================================
1389--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
1390+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
1391@@ -4,7 +4,6 @@
1392 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1393 // { dg-require-cstdint "" }
1394 // { dg-require-gthreads "" }
1395-// { dg-require-atomic-builtins "" }
1396
1397 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1398 //
1399Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
1400===================================================================
1401--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
1402+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
1403@@ -4,7 +4,6 @@
1404 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1405 // { dg-require-cstdint "" }
1406 // { dg-require-gthreads "" }
1407-// { dg-require-atomic-builtins "" }
1408
1409 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1410 //
1411Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
1412===================================================================
1413--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
1414+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
1415@@ -4,7 +4,6 @@
1416 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1417 // { dg-require-cstdint "" }
1418 // { dg-require-gthreads "" }
1419-// { dg-require-atomic-builtins "" }
1420
1421 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1422 //
1423Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
1424===================================================================
1425--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
1426+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
1427@@ -4,7 +4,6 @@
1428 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1429 // { dg-require-cstdint "" }
1430 // { dg-require-gthreads "" }
1431-// { dg-require-atomic-builtins "" }
1432
1433 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1434 //
1435Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
1436===================================================================
1437--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
1438+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
1439@@ -4,7 +4,6 @@
1440 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1441 // { dg-require-cstdint "" }
1442 // { dg-require-gthreads "" }
1443-// { dg-require-atomic-builtins "" }
1444
1445 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1446 //
1447Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
1448===================================================================
1449--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
1450+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
1451@@ -4,7 +4,6 @@
1452 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1453 // { dg-require-cstdint "" }
1454 // { dg-require-gthreads "" }
1455-// { dg-require-atomic-builtins "" }
1456
1457 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1458 //
1459Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
1460===================================================================
1461--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
1462+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
1463@@ -4,7 +4,6 @@
1464 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1465 // { dg-require-cstdint "" }
1466 // { dg-require-gthreads "" }
1467-// { dg-require-atomic-builtins "" }
1468
1469 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1470 //
1471Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
1472===================================================================
1473--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
1474+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
1475@@ -4,7 +4,6 @@
1476 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1477 // { dg-require-cstdint "" }
1478 // { dg-require-gthreads "" }
1479-// { dg-require-atomic-builtins "" }
1480
1481 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1482 //
1483Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
1484===================================================================
1485--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
1486+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
1487@@ -4,7 +4,6 @@
1488 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1489 // { dg-require-cstdint "" }
1490 // { dg-require-gthreads "" }
1491-// { dg-require-atomic-builtins "" }
1492
1493 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1494 //
1495Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
1496===================================================================
1497--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
1498+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
1499@@ -4,7 +4,6 @@
1500 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1501 // { dg-require-cstdint "" }
1502 // { dg-require-gthreads "" }
1503-// { dg-require-atomic-builtins "" }
1504
1505 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1506 //
1507Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
1508===================================================================
1509--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
1510+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
1511@@ -4,7 +4,6 @@
1512 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1513 // { dg-require-cstdint "" }
1514 // { dg-require-gthreads "" }
1515-// { dg-require-atomic-builtins "" }
1516
1517 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
1518 //
1519Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
1520===================================================================
1521--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
1522+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/requirements/explicit_instantiation.cc
1523@@ -2,7 +2,6 @@
1524 // { dg-options "-std=gnu++11" }
1525 // { dg-require-cstdint "" }
1526 // { dg-require-gthreads "" }
1527-// { dg-require-atomic-builtins "" }
1528
1529 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1530 //
1531Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
1532===================================================================
1533--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
1534+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/packaged_task/uses_allocator.cc
1535@@ -2,7 +2,6 @@
1536 // { dg-options "-std=gnu++11" }
1537 // { dg-require-cstdint "" }
1538 // { dg-require-gthreads "" }
1539-// { dg-require-atomic-builtins "" }
1540
1541 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
1542 //
1543Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/60966.cc
1544===================================================================
1545--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/60966.cc
1546+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/60966.cc
1547@@ -4,7 +4,6 @@
1548 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1549 // { dg-require-cstdint "" }
1550 // { dg-require-gthreads "" }
1551-// { dg-require-atomic-builtins "" }
1552
1553 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
1554 //
1555Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/69106.cc
1556===================================================================
1557--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/69106.cc
1558+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/69106.cc
1559@@ -19,7 +19,6 @@
1560 // { dg-options "-std=gnu++11" }
1561 // { dg-require-cstdint "" }
1562 // { dg-require-gthreads "" }
1563-// { dg-require-atomic-builtins "" }
1564
1565 #include <future>
1566
1567Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
1568===================================================================
1569--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
1570+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
1571@@ -4,7 +4,6 @@
1572 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1573 // { dg-require-cstdint "" }
1574 // { dg-require-gthreads "" }
1575-// { dg-require-atomic-builtins "" }
1576
1577 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1578 //
1579Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
1580===================================================================
1581--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
1582+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
1583@@ -4,7 +4,6 @@
1584 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1585 // { dg-require-cstdint "" }
1586 // { dg-require-gthreads "" }
1587-// { dg-require-atomic-builtins "" }
1588
1589 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
1590 //
1591Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
1592===================================================================
1593--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
1594+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/alloc2.cc
1595@@ -2,7 +2,6 @@
1596 // { dg-options "-std=gnu++11" }
1597 // { dg-require-cstdint "" }
1598 // { dg-require-gthreads "" }
1599-// { dg-require-atomic-builtins "" }
1600
1601 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
1602 //
1603Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
1604===================================================================
1605--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
1606+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/alloc_min.cc
1607@@ -2,7 +2,6 @@
1608 // { dg-options "-std=gnu++11" }
1609 // { dg-require-cstdint "" }
1610 // { dg-require-gthreads "" }
1611-// { dg-require-atomic-builtins "" }
1612
1613 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
1614 //
1615Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
1616===================================================================
1617--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
1618+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
1619@@ -2,7 +2,6 @@
1620 // { dg-options "-std=gnu++11" }
1621 // { dg-require-cstdint "" }
1622 // { dg-require-gthreads "" }
1623-// { dg-require-atomic-builtins "" }
1624
1625 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1626 //
1627Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
1628===================================================================
1629--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
1630+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
1631@@ -2,7 +2,6 @@
1632 // { dg-options "-std=gnu++11" }
1633 // { dg-require-cstdint "" }
1634 // { dg-require-gthreads "" }
1635-// { dg-require-atomic-builtins "" }
1636
1637 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1638 //
1639Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
1640===================================================================
1641--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
1642+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
1643@@ -4,7 +4,6 @@
1644 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1645 // { dg-require-cstdint "" }
1646 // { dg-require-gthreads "" }
1647-// { dg-require-atomic-builtins "" }
1648
1649 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1650 //
1651Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
1652===================================================================
1653--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
1654+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
1655@@ -4,7 +4,6 @@
1656 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1657 // { dg-require-cstdint "" }
1658 // { dg-require-gthreads "" }
1659-// { dg-require-atomic-builtins "" }
1660
1661 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1662 //
1663Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
1664===================================================================
1665--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
1666+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
1667@@ -4,7 +4,6 @@
1668 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1669 // { dg-require-cstdint "" }
1670 // { dg-require-gthreads "" }
1671-// { dg-require-atomic-builtins "" }
1672
1673 // Copyright (C) 2014-2016 Free Software Foundation, Inc.
1674 //
1675Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
1676===================================================================
1677--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
1678+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
1679@@ -4,7 +4,6 @@
1680 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1681 // { dg-require-cstdint "" }
1682 // { dg-require-gthreads "" }
1683-// { dg-require-atomic-builtins "" }
1684
1685 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1686 //
1687Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
1688===================================================================
1689--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
1690+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
1691@@ -4,7 +4,6 @@
1692 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1693 // { dg-require-cstdint "" }
1694 // { dg-require-gthreads "" }
1695-// { dg-require-atomic-builtins "" }
1696
1697 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1698 //
1699Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
1700===================================================================
1701--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
1702+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
1703@@ -4,7 +4,6 @@
1704 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1705 // { dg-require-cstdint "" }
1706 // { dg-require-gthreads "" }
1707-// { dg-require-atomic-builtins "" }
1708
1709 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1710 //
1711Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
1712===================================================================
1713--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
1714+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
1715@@ -4,7 +4,6 @@
1716 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1717 // { dg-require-cstdint "" }
1718 // { dg-require-gthreads "" }
1719-// { dg-require-atomic-builtins "" }
1720
1721 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1722 //
1723Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
1724===================================================================
1725--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
1726+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
1727@@ -4,7 +4,6 @@
1728 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1729 // { dg-require-cstdint "" }
1730 // { dg-require-gthreads "" }
1731-// { dg-require-atomic-builtins "" }
1732
1733 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1734 //
1735Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
1736===================================================================
1737--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
1738+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
1739@@ -4,7 +4,6 @@
1740 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1741 // { dg-require-cstdint "" }
1742 // { dg-require-gthreads "" }
1743-// { dg-require-atomic-builtins "" }
1744
1745 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1746 //
1747Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
1748===================================================================
1749--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
1750+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
1751@@ -4,7 +4,6 @@
1752 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1753 // { dg-require-cstdint "" }
1754 // { dg-require-gthreads "" }
1755-// { dg-require-atomic-builtins "" }
1756
1757 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1758 //
1759Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
1760===================================================================
1761--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
1762+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
1763@@ -4,7 +4,6 @@
1764 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1765 // { dg-require-cstdint "" }
1766 // { dg-require-gthreads "" }
1767-// { dg-require-atomic-builtins "" }
1768
1769 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1770 //
1771Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
1772===================================================================
1773--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
1774+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/requirements/explicit_instantiation.cc
1775@@ -2,7 +2,6 @@
1776 // { dg-options "-std=gnu++11" }
1777 // { dg-require-cstdint "" }
1778 // { dg-require-gthreads "" }
1779-// { dg-require-atomic-builtins "" }
1780
1781 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1782 //
1783Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
1784===================================================================
1785--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
1786+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/promise/uses_allocator.cc
1787@@ -2,7 +2,6 @@
1788 // { dg-options "-std=gnu++11" }
1789 // { dg-require-cstdint "" }
1790 // { dg-require-gthreads "" }
1791-// { dg-require-atomic-builtins "" }
1792
1793 // Copyright (C) 2011-2016 Free Software Foundation, Inc.
1794 //
1795Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
1796===================================================================
1797--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
1798+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign.cc
1799@@ -1,7 +1,6 @@
1800 // { dg-options "-std=gnu++11" }
1801 // { dg-require-cstdint "" }
1802 // { dg-require-gthreads "" }
1803-// { dg-require-atomic-builtins "" }
1804
1805 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
1806 //
1807Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
1808===================================================================
1809--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
1810+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/cons/constexpr.cc
1811@@ -2,7 +2,6 @@
1812 // { dg-options "-std=gnu++11 -fno-inline -g0" }
1813 // { dg-require-cstdint "" }
1814 // { dg-require-gthreads "" }
1815-// { dg-require-atomic-builtins "" }
1816 // { dg-final { scan-assembler-not "_ZNSt13shared_futureIvEC2Ev" } }
1817 // { dg-final { scan-assembler-not "_ZNSt13shared_futureIiEC2Ev" } }
1818
1819Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
1820===================================================================
1821--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
1822+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/cons/copy.cc
1823@@ -2,7 +2,6 @@
1824 // { dg-options "-std=gnu++11" }
1825 // { dg-require-cstdint "" }
1826 // { dg-require-gthreads "" }
1827-// { dg-require-atomic-builtins "" }
1828
1829 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1830 //
1831Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
1832===================================================================
1833--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
1834+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/cons/default.cc
1835@@ -1,7 +1,6 @@
1836 // { dg-options "-std=gnu++11" }
1837 // { dg-require-cstdint "" }
1838 // { dg-require-gthreads "" }
1839-// { dg-require-atomic-builtins "" }
1840
1841 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
1842 //
1843Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
1844===================================================================
1845--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
1846+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
1847@@ -4,7 +4,6 @@
1848 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1849 // { dg-require-cstdint "" }
1850 // { dg-require-gthreads "" }
1851-// { dg-require-atomic-builtins "" }
1852
1853 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1854 //
1855Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
1856===================================================================
1857--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
1858+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/cons/move_assign.cc
1859@@ -1,7 +1,6 @@
1860 // { dg-options "-std=gnu++11" }
1861 // { dg-require-cstdint "" }
1862 // { dg-require-gthreads "" }
1863-// { dg-require-atomic-builtins "" }
1864
1865 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
1866 //
1867Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
1868===================================================================
1869--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
1870+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
1871@@ -4,7 +4,6 @@
1872 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1873 // { dg-require-cstdint "" }
1874 // { dg-require-gthreads "" }
1875-// { dg-require-atomic-builtins "" }
1876
1877 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
1878 //
1879Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
1880===================================================================
1881--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
1882+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
1883@@ -4,7 +4,6 @@
1884 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1885 // { dg-require-cstdint "" }
1886 // { dg-require-gthreads "" }
1887-// { dg-require-atomic-builtins "" }
1888
1889 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1890 //
1891Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
1892===================================================================
1893--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
1894+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
1895@@ -4,7 +4,6 @@
1896 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1897 // { dg-require-cstdint "" }
1898 // { dg-require-gthreads "" }
1899-// { dg-require-atomic-builtins "" }
1900
1901 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1902 //
1903Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
1904===================================================================
1905--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
1906+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
1907@@ -4,7 +4,6 @@
1908 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1909 // { dg-require-cstdint "" }
1910 // { dg-require-gthreads "" }
1911-// { dg-require-atomic-builtins "" }
1912
1913 // Copyright (C) 2010-2016 Free Software Foundation, Inc.
1914 //
1915Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
1916===================================================================
1917--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
1918+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
1919@@ -4,7 +4,6 @@
1920 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1921 // { dg-require-cstdint "" }
1922 // { dg-require-gthreads "" }
1923-// { dg-require-atomic-builtins "" }
1924
1925 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1926 //
1927Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
1928===================================================================
1929--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
1930+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
1931@@ -4,7 +4,6 @@
1932 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1933 // { dg-require-cstdint "" }
1934 // { dg-require-gthreads "" }
1935-// { dg-require-atomic-builtins "" }
1936
1937 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1938 //
1939Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
1940===================================================================
1941--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
1942+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
1943@@ -4,7 +4,6 @@
1944 // { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-rtems* *-*-darwin* } }
1945 // { dg-require-cstdint "" }
1946 // { dg-require-gthreads "" }
1947-// { dg-require-atomic-builtins "" }
1948
1949 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1950 //
1951Index: gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
1952===================================================================
1953--- gcc-6.3.0.orig/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
1954+++ gcc-6.3.0/libstdc++-v3/testsuite/30_threads/shared_future/requirements/explicit_instantiation.cc
1955@@ -2,7 +2,6 @@
1956 // { dg-options "-std=gnu++11" }
1957 // { dg-require-cstdint "" }
1958 // { dg-require-gthreads "" }
1959-// { dg-require-atomic-builtins "" }
1960
1961 // Copyright (C) 2009-2016 Free Software Foundation, Inc.
1962 //
1963Index: gcc-6.3.0/libstdc++-v3/ChangeLog
1964===================================================================
1965--- gcc-6.3.0.orig/libstdc++-v3/ChangeLog
1966+++ gcc-6.3.0/libstdc++-v3/ChangeLog
1967@@ -2,6 +2,43 @@
1968
1969 * GCC 6.3.0 released.
1970
1971+2017-01-04 Pauli Nieminen <suokkos@gmail.com>
1972+ Jonathan Wakely <jwakely@redhat.com>
1973+
1974+ PR libstdc++/64735
1975+ * acinclude.m4 (GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER): Define.
1976+ * config.h.in: Regenerate.
1977+ * config/abi/pre/gnu.ver [HAVE_EXCEPTION_PTR_SINCE_GCC46]
1978+ (GLIBCXX_3.4.15, GLIBCXX_3.4.21, CXXABI_1.3.3, CXXABI_1.3.5): Make
1979+ exports for exception_ptr, nested_exception, and future conditional.
1980+ [HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.23, CXXABI_1.3.11): Add
1981+ exports for exception_ptr, nested_exception, and future conditional.
1982+ * configure: Regenerate.
1983+ * configure.ac: Use GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER.
1984+ * include/std/future: Remove check for ATOMIC_INT_LOCK_FREE
1985+ * libsupc++/eh_atomics.h: New file for internal use only.
1986+ (__eh_atomic_inc, __eh_atomic_dec): New.
1987+ * libsupc++/eh_ptr.cc (exception_ptr::_M_addref)
1988+ (exception_ptr::_M_release) (__gxx_dependent_exception_cleanup)
1989+ (rethrow_exception): Use eh_atomics.h reference counting helpers.
1990+ * libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise.
1991+ * libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise.
1992+ * libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE.
1993+ * libsupc++/exception_ptr.h: Likewise.
1994+ * libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro.
1995+ * libsupc++/nested_exception.cc: Remove check for
1996+ ATOMIC_INT_LOCK_FREE.
1997+ * libsupc++/nested_exception.h: Likewise.
1998+ * src/c++11/future.cc: Likewise.
1999+ * testsuite/18_support/exception_ptr/*: Remove atomic builtins checks.
2000+ * testsuite/18_support/nested_exception/*: Likewise.
2001+ * testsuite/30_threads/async/*: Likewise.
2002+ * testsuite/30_threads/future/*: Likewise.
2003+ * testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
2004+ * testsuite/30_threads/packaged_task/*: Likewise.
2005+ * testsuite/30_threads/promise/*: Likewise.
2006+ * testsuite/30_threads/shared_future/*: Likewise.
2007+
2008 2016-12-12 Jonathan Wakely <jwakely@redhat.com>
2009
2010 Backport from mainline