[PATCH] PR libstdc++/80316 make promise::set_value throw no_state error

2017-04-04 Thread Jonathan Wakely

We got a bug report from a customer pointing out that calling
promise::set_value on a moved-from promise crashes instead of throwing
an exception with error code future_errc::no_state.

This fixes it, by moving the _S_check calls to *before* we deference
the pointer that the calls check!

This passes all tests, including the more comprehensive ones I've
added as part of this commit, but I think it can wait for stage 1
anyway. We've been shipping this bug for a couple of releases already.

PR libstdc++/80316
* include/std/future (_State_baseV2::_Setter::operator()): Remove
_S_check calls that are done after the pointer to the shared state is
already dereferenced.
(_State_baseV2::_Setter<_Res, void>): Define specialization for void
as partial specialization so it can be defined within the definition
of _State_baseV2.
(_State_baseV2::__setter): Call _S_check.
(_State_baseV2::__setter(promise*)): Add overload for use by
promise::set_value and promise::set_value_at_thread_exit.
(promise, promise, promise): Make _State a friend.
(_State_baseV2::_Setter): Remove explicit specialization.
(promise::set_value, promise::set_value_at_thread_exit):
Use new __setter overload.
* testsuite/30_threads/promise/members/at_thread_exit2.cc: New test.
* testsuite/30_threads/promise/members/set_exception.cc: Test
promise and promise specializations.
* testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
Test for no_state error condition.
* testsuite/30_threads/promise/members/set_value2.cc: Likewise.


commit 83c1e45d0759dd095c7b35d67fb5ba98dc7bf909
Author: Jonathan Wakely 
Date:   Tue Apr 4 19:48:33 2017 +0100

PR libstdc++/80316 make promise::set_value throw no_state error

PR libstdc++/80316
* include/std/future (_State_baseV2::_Setter::operator()): Remove
_S_check calls that are done after the pointer to the shared state is
already dereferenced.
(_State_baseV2::_Setter<_Res, void>): Define specialization for void
as partial specialization so it can be defined within the definition
of _State_baseV2.
(_State_baseV2::__setter): Call _S_check.
(_State_baseV2::__setter(promise*)): Add overload for use by
promise::set_value and promise::set_value_at_thread_exit.
(promise, promise, promise): Make _State a friend.
(_State_baseV2::_Setter): Remove explicit specialization.
(promise::set_value, promise::set_value_at_thread_exit):
Use new __setter overload.
* testsuite/30_threads/promise/members/at_thread_exit2.cc: New test.
* testsuite/30_threads/promise/members/set_exception.cc: Test
promise and promise specializations.
* testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
Test for no_state error condition.
* testsuite/30_threads/promise/members/set_value2.cc: Likewise.

diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future
index cb53561..73d5a60 100644
--- a/libstdc++-v3/include/std/future
+++ b/libstdc++-v3/include/std/future
@@ -471,7 +471,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
  // Used by std::promise to copy construct the result.
   typename promise<_Res>::_Ptr_type operator()() const
   {
-_State_baseV2::_S_check(_M_promise->_M_future);
 _M_promise->_M_storage->_M_set(*_M_arg);
 return std::move(_M_promise->_M_storage);
   }
@@ -486,7 +485,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
  // Used by std::promise to move construct the result.
   typename promise<_Res>::_Ptr_type operator()() const
   {
-_State_baseV2::_S_check(_M_promise->_M_future);
 _M_promise->_M_storage->_M_set(std::move(*_M_arg));
 return std::move(_M_promise->_M_storage);
   }
@@ -494,6 +492,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   _Res* _M_arg;
 };
 
+  // set void
+  template
+   struct _Setter<_Res, void>
+   {
+ static_assert(is_void<_Res>::value, "Only used for promise");
+
+ typename promise<_Res>::_Ptr_type operator()() const
+ { return std::move(_M_promise->_M_storage); }
+
+ promise<_Res>*_M_promise;
+   };
+
   struct __exception_ptr_tag { };
 
   // set exceptions
@@ -503,7 +513,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
  // Used by std::promise to store an exception as the result.
   typename promise<_Res>::_Ptr_type operator()() const
   {
-_State_baseV2::_S_check(_M_promise->_M_future);
 _M_promise->_M_storage->_M_error = *_M_ex;
 return std::move(_M_promise->_M_storage);
   }
@@ -516,6 +525,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 static _Setter<_Res, _Arg&&>
 __setter(promise<

Re: [PATCH] PR libstdc++/80316 make promise::set_value throw no_state error

2017-04-21 Thread Jonathan Wakely
On 4 April 2017 at 20:44, Jonathan Wakely wrote:
> We got a bug report from a customer pointing out that calling
> promise::set_value on a moved-from promise crashes instead of throwing
> an exception with error code future_errc::no_state.
>
> This fixes it, by moving the _S_check calls to *before* we deference
> the pointer that the calls check!
>
> This passes all tests, including the more comprehensive ones I've
> added as part of this commit, but I think it can wait for stage 1
> anyway. We've been shipping this bug for a couple of releases already.
>
> PR libstdc++/80316
> * include/std/future (_State_baseV2::_Setter::operator()): Remove
> _S_check calls that are done after the pointer to the shared state
> is
> already dereferenced.
> (_State_baseV2::_Setter<_Res, void>): Define specialization for void
> as partial specialization so it can be defined within the definition
> of _State_baseV2.
> (_State_baseV2::__setter): Call _S_check.
> (_State_baseV2::__setter(promise*)): Add overload for use by
> promise::set_value and
> promise::set_value_at_thread_exit.
> (promise, promise, promise): Make _State a friend.
> (_State_baseV2::_Setter): Remove explicit
> specialization.
> (promise::set_value, promise::set_value_at_thread_exit):
> Use new __setter overload.
> * testsuite/30_threads/promise/members/at_thread_exit2.cc: New test.
> * testsuite/30_threads/promise/members/set_exception.cc: Test
> promise and promise specializations.
> * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
> Test for no_state error condition.
> * testsuite/30_threads/promise/members/set_value2.cc: Likewise.


This is now committed to trunk.


Re: [PATCH] PR libstdc++/80316 make promise::set_value throw no_state error

2017-07-11 Thread Jonathan Wakely

On 21/04/17 15:54 +0100, Jonathan Wakely wrote:

On 4 April 2017 at 20:44, Jonathan Wakely wrote:

We got a bug report from a customer pointing out that calling
promise::set_value on a moved-from promise crashes instead of throwing
an exception with error code future_errc::no_state.

This fixes it, by moving the _S_check calls to *before* we deference
the pointer that the calls check!

This passes all tests, including the more comprehensive ones I've
added as part of this commit, but I think it can wait for stage 1
anyway. We've been shipping this bug for a couple of releases already.

PR libstdc++/80316
* include/std/future (_State_baseV2::_Setter::operator()): Remove
_S_check calls that are done after the pointer to the shared state
is
already dereferenced.
(_State_baseV2::_Setter<_Res, void>): Define specialization for void
as partial specialization so it can be defined within the definition
of _State_baseV2.
(_State_baseV2::__setter): Call _S_check.
(_State_baseV2::__setter(promise*)): Add overload for use by
promise::set_value and
promise::set_value_at_thread_exit.
(promise, promise, promise): Make _State a friend.
(_State_baseV2::_Setter): Remove explicit
specialization.
(promise::set_value, promise::set_value_at_thread_exit):
Use new __setter overload.
* testsuite/30_threads/promise/members/at_thread_exit2.cc: New test.
* testsuite/30_threads/promise/members/set_exception.cc: Test
promise and promise specializations.
* testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
Test for no_state error condition.
* testsuite/30_threads/promise/members/set_value2.cc: Likewise.



This is now committed to trunk.


And now also to gcc-7-branch.



Re: [PATCH] PR libstdc++/80316 make promise::set_value throw no_state error

2017-07-11 Thread Jonathan Wakely

On 11/07/17 12:53 +0100, Jonathan Wakely wrote:

On 21/04/17 15:54 +0100, Jonathan Wakely wrote:

On 4 April 2017 at 20:44, Jonathan Wakely wrote:

We got a bug report from a customer pointing out that calling
promise::set_value on a moved-from promise crashes instead of throwing
an exception with error code future_errc::no_state.

This fixes it, by moving the _S_check calls to *before* we deference
the pointer that the calls check!

This passes all tests, including the more comprehensive ones I've
added as part of this commit, but I think it can wait for stage 1
anyway. We've been shipping this bug for a couple of releases already.

   PR libstdc++/80316
   * include/std/future (_State_baseV2::_Setter::operator()): Remove
   _S_check calls that are done after the pointer to the shared state
is
   already dereferenced.
   (_State_baseV2::_Setter<_Res, void>): Define specialization for void
   as partial specialization so it can be defined within the definition
   of _State_baseV2.
   (_State_baseV2::__setter): Call _S_check.
   (_State_baseV2::__setter(promise*)): Add overload for use by
   promise::set_value and
promise::set_value_at_thread_exit.
   (promise, promise, promise): Make _State a friend.
   (_State_baseV2::_Setter): Remove explicit
specialization.
   (promise::set_value, promise::set_value_at_thread_exit):
   Use new __setter overload.
   * testsuite/30_threads/promise/members/at_thread_exit2.cc: New test.
   * testsuite/30_threads/promise/members/set_exception.cc: Test
   promise and promise specializations.
   * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
   Test for no_state error condition.
   * testsuite/30_threads/promise/members/set_value2.cc: Likewise.



This is now committed to trunk.


And now also to gcc-7-branch.


And gcc-6-branch.



Re: [PATCH] PR libstdc++/80316 make promise::set_value throw no_state error

2017-07-12 Thread Christophe Lyon
On 11 July 2017 at 14:39, Jonathan Wakely  wrote:
> On 11/07/17 12:53 +0100, Jonathan Wakely wrote:
>>
>> On 21/04/17 15:54 +0100, Jonathan Wakely wrote:
>>>
>>> On 4 April 2017 at 20:44, Jonathan Wakely wrote:

 We got a bug report from a customer pointing out that calling
 promise::set_value on a moved-from promise crashes instead of throwing
 an exception with error code future_errc::no_state.

 This fixes it, by moving the _S_check calls to *before* we deference
 the pointer that the calls check!

 This passes all tests, including the more comprehensive ones I've
 added as part of this commit, but I think it can wait for stage 1
 anyway. We've been shipping this bug for a couple of releases already.

PR libstdc++/80316
* include/std/future (_State_baseV2::_Setter::operator()): Remove
_S_check calls that are done after the pointer to the shared
 state
 is
already dereferenced.
(_State_baseV2::_Setter<_Res, void>): Define specialization for
 void
as partial specialization so it can be defined within the
 definition
of _State_baseV2.
(_State_baseV2::__setter): Call _S_check.
(_State_baseV2::__setter(promise*)): Add overload for use
 by
promise::set_value and
 promise::set_value_at_thread_exit.
(promise, promise, promise): Make _State a friend.
(_State_baseV2::_Setter): Remove explicit
 specialization.
(promise::set_value,
 promise::set_value_at_thread_exit):
Use new __setter overload.
* testsuite/30_threads/promise/members/at_thread_exit2.cc: New
 test.
* testsuite/30_threads/promise/members/set_exception.cc: Test
promise and promise specializations.
* testsuite/30_threads/promise/members/set_exception2.cc:
 Likewise.
Test for no_state error condition.
* testsuite/30_threads/promise/members/set_value2.cc: Likewise.
>>>
>>>
>>>
>>> This is now committed to trunk.
>>
>>
>> And now also to gcc-7-branch.
>
>
> And gcc-6-branch.
>

Hi Jonathan,

The new test fails to compile on arm when forcing -march=armv5t:
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:
In function 'void test01()':^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:31:
error: aggregate 'std::promise p1' has incomplete type and cannot
be defined^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:44:
error: 'make_exception_ptr' is not a member of 'std'^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:52:
error: variable 'std::promise p2' has initializer but incomplete
type^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:64:
error: 'make_exception_ptr' is not a member of 'std'^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:
In function 'void test02()':^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:75:
error: aggregate 'std::promise p1' has incomplete type and
cannot be defined^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:89:
error: 'make_exception_ptr' is not a member of 'std'^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:97:
error: variable 'std::promise p2' has initializer but incomplete
type^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:110:
error: 'make_exception_ptr' is not a member of 'std'^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:
In function 'void test03()':^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:121:
error: aggregate 'std::promise p1' has incomplete type and
cannot be defined^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:134:
error: 'make_exception_ptr' is not a member of 'std'^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:142:
error: variable 'std::promise p2' has initializer but incomplete
type^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:153:
error: 'make_exception_ptr' is not a member of 'std'^M
compiler exited with status 1

I can see this on target arm-none-linux-gnueabihf --with-mode arm
--with-cpu cortex-a9 --with-fpu vfp and setting -march=armv5t in
runtestflags.

It also looks like you forgot to add a ChangeLog

Re: [PATCH] PR libstdc++/80316 make promise::set_value throw no_state error

2017-07-12 Thread Jonathan Wakely

On 12/07/17 09:46 +0200, Christophe Lyon wrote:

On 11 July 2017 at 14:39, Jonathan Wakely  wrote:

On 11/07/17 12:53 +0100, Jonathan Wakely wrote:


On 21/04/17 15:54 +0100, Jonathan Wakely wrote:


On 4 April 2017 at 20:44, Jonathan Wakely wrote:


We got a bug report from a customer pointing out that calling
promise::set_value on a moved-from promise crashes instead of throwing
an exception with error code future_errc::no_state.

This fixes it, by moving the _S_check calls to *before* we deference
the pointer that the calls check!

This passes all tests, including the more comprehensive ones I've
added as part of this commit, but I think it can wait for stage 1
anyway. We've been shipping this bug for a couple of releases already.

   PR libstdc++/80316
   * include/std/future (_State_baseV2::_Setter::operator()): Remove
   _S_check calls that are done after the pointer to the shared
state
is
   already dereferenced.
   (_State_baseV2::_Setter<_Res, void>): Define specialization for
void
   as partial specialization so it can be defined within the
definition
   of _State_baseV2.
   (_State_baseV2::__setter): Call _S_check.
   (_State_baseV2::__setter(promise*)): Add overload for use
by
   promise::set_value and
promise::set_value_at_thread_exit.
   (promise, promise, promise): Make _State a friend.
   (_State_baseV2::_Setter): Remove explicit
specialization.
   (promise::set_value,
promise::set_value_at_thread_exit):
   Use new __setter overload.
   * testsuite/30_threads/promise/members/at_thread_exit2.cc: New
test.
   * testsuite/30_threads/promise/members/set_exception.cc: Test
   promise and promise specializations.
   * testsuite/30_threads/promise/members/set_exception2.cc:
Likewise.
   Test for no_state error condition.
   * testsuite/30_threads/promise/members/set_value2.cc: Likewise.




This is now committed to trunk.



And now also to gcc-7-branch.



And gcc-6-branch.



Hi Jonathan,

The new test fails to compile on arm when forcing -march=armv5t:
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:
In function 'void test01()':^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:31:
error: aggregate 'std::promise p1' has incomplete type and cannot
be defined^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:44:
error: 'make_exception_ptr' is not a member of 'std'^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:52:
error: variable 'std::promise p2' has initializer but incomplete
type^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:64:
error: 'make_exception_ptr' is not a member of 'std'^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:
In function 'void test02()':^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:75:
error: aggregate 'std::promise p1' has incomplete type and
cannot be defined^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:89:
error: 'make_exception_ptr' is not a member of 'std'^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:97:
error: variable 'std::promise p2' has initializer but incomplete
type^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:110:
error: 'make_exception_ptr' is not a member of 'std'^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:
In function 'void test03()':^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:121:
error: aggregate 'std::promise p1' has incomplete type and
cannot be defined^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:134:
error: 'make_exception_ptr' is not a member of 'std'^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:142:
error: variable 'std::promise p2' has initializer but incomplete
type^M
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:153:
error: 'make_exception_ptr' is not a member of 'std'^M
compiler exited with status 1

I can see this on target arm-none-linux-gnueabihf --with-mode arm
--with-cpu cortex-a9 --with-fpu vfp and setting -march=armv5t in
runtestflags.

It also looks like you forgot to add a ChangeLog entry for the
testsuite changes.


These changes?

* testsuite/30_threads/promise/members/at_thread_exit2.cc: New test.
* testsuite/30_threads/promise/members/set_excepti

Re: [PATCH] PR libstdc++/80316 make promise::set_value throw no_state error

2017-07-12 Thread Christophe Lyon
On 12 July 2017 at 12:15, Jonathan Wakely  wrote:
> On 12/07/17 09:46 +0200, Christophe Lyon wrote:
>>
>> On 11 July 2017 at 14:39, Jonathan Wakely  wrote:
>>>
>>> On 11/07/17 12:53 +0100, Jonathan Wakely wrote:


 On 21/04/17 15:54 +0100, Jonathan Wakely wrote:
>
>
> On 4 April 2017 at 20:44, Jonathan Wakely wrote:
>>
>>
>> We got a bug report from a customer pointing out that calling
>> promise::set_value on a moved-from promise crashes instead of throwing
>> an exception with error code future_errc::no_state.
>>
>> This fixes it, by moving the _S_check calls to *before* we deference
>> the pointer that the calls check!
>>
>> This passes all tests, including the more comprehensive ones I've
>> added as part of this commit, but I think it can wait for stage 1
>> anyway. We've been shipping this bug for a couple of releases already.
>>
>>PR libstdc++/80316
>>* include/std/future (_State_baseV2::_Setter::operator()):
>> Remove
>>_S_check calls that are done after the pointer to the shared
>> state
>> is
>>already dereferenced.
>>(_State_baseV2::_Setter<_Res, void>): Define specialization for
>> void
>>as partial specialization so it can be defined within the
>> definition
>>of _State_baseV2.
>>(_State_baseV2::__setter): Call _S_check.
>>(_State_baseV2::__setter(promise*)): Add overload for use
>> by
>>promise::set_value and
>> promise::set_value_at_thread_exit.
>>(promise, promise, promise): Make _State a friend.
>>(_State_baseV2::_Setter): Remove explicit
>> specialization.
>>(promise::set_value,
>> promise::set_value_at_thread_exit):
>>Use new __setter overload.
>>* testsuite/30_threads/promise/members/at_thread_exit2.cc: New
>> test.
>>* testsuite/30_threads/promise/members/set_exception.cc: Test
>>promise and promise specializations.
>>* testsuite/30_threads/promise/members/set_exception2.cc:
>> Likewise.
>>Test for no_state error condition.
>>* testsuite/30_threads/promise/members/set_value2.cc: Likewise.
>
>
>
>
> This is now committed to trunk.



 And now also to gcc-7-branch.
>>>
>>>
>>>
>>> And gcc-6-branch.
>>>
>>
>> Hi Jonathan,
>>
>> The new test fails to compile on arm when forcing -march=armv5t:
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:
>> In function 'void test01()':^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:31:
>> error: aggregate 'std::promise p1' has incomplete type and cannot
>> be defined^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:44:
>> error: 'make_exception_ptr' is not a member of 'std'^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:52:
>> error: variable 'std::promise p2' has initializer but incomplete
>> type^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:64:
>> error: 'make_exception_ptr' is not a member of 'std'^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:
>> In function 'void test02()':^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:75:
>> error: aggregate 'std::promise p1' has incomplete type and
>> cannot be defined^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:89:
>> error: 'make_exception_ptr' is not a member of 'std'^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:97:
>> error: variable 'std::promise p2' has initializer but incomplete
>> type^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:110:
>> error: 'make_exception_ptr' is not a member of 'std'^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:
>> In function 'void test03()':^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:121:
>> error: aggregate 'std::promise p1' has incomplete type and
>> cannot be defined^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:134:
>> error: 'make_exception_ptr' is not a member of 'std'^M
>>
>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc:142:
>> error: variable 'std::promise p2' has initial