]> gcc.gnu.org Git - gcc.git/commit
coroutines : Adjust constraints on when to build ctors [PR98118].
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 17 Feb 2021 15:13:57 +0000 (15:13 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Fri, 5 Mar 2021 16:57:37 +0000 (16:57 +0000)
commit3d9577c254003f2d18185015b75ce6e3e4af9ca2
tree70357716fd6e019d39e597a5d04e36eeff1b5be8
parent9ee91079fd5879cba046e452ab5593372166b2ab
coroutines : Adjust constraints on when to build ctors [PR98118].

PR98118 shows that TYPE_NEEDS_CONSTRUCTING is necessary but not
sufficient.  Use type_build_ctor_call() instead.

gcc/cp/ChangeLog:

PR c++/98118
* coroutines.cc (build_co_await): Use type_build_ctor_call()
to determine cases when a CTOR needs to be built.
(flatten_await_stmt): Likewise.
(morph_fn_to_coro): Likewise.

gcc/testsuite/ChangeLog:

PR c++/98118
* g++.dg/coroutines/pr98118.C: New test.
gcc/cp/coroutines.cc
gcc/testsuite/g++.dg/coroutines/pr98118.C [new file with mode: 0644]
This page took 0.055766 seconds and 5 git commands to generate.