]> gcc.gnu.org Git - gcc.git/commit
[coro] Fix co_await of void type.
authorIain Sandoe <iain@sandoe.co.uk>
Tue, 21 Jan 2020 20:42:17 +0000 (20:42 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Tue, 21 Jan 2020 20:57:30 +0000 (20:57 +0000)
commita312c80194685790aec7cf678eba83a536031cbf
tree80541e1c9df1ce219287468f736a8f2042f336f8
parentbd0a3e244d94ad4a5e41f01ebf285f0861cb4a03
[coro] Fix co_await of void type.

gcc/cp
2020-01-21  Iain Sandoe  <iain@sandoe.co.uk>
    Bin Cheng  <bin.cheng@linux.alibaba.com>

* coroutines.cc (coro_promise_type_found_p): Check for NULL return
from complete_type_or_else.
(register_param_uses): Likewise.
(build_co_await): Do not try to use complete_type_or_else for void
types, otherwise for incomplete types, check for NULL return from
complete_type_or_else.

gcc/testsuite
2020-01-21  Bin Cheng  <bin.linux@linux.alibaba.com>

* g++.dg/coroutines/co-await-void_type.C: New test.
gcc/cp/ChangeLog
gcc/cp/coroutines.cc
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/coroutines/co-await-void_type.C [new file with mode: 0644]
This page took 0.06106 seconds and 5 git commands to generate.