diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-04-21 10:35:13 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2020-04-21 11:08:49 +0100 |
commit | cd08718d57d1552fa2dbca96809e4915559685e7 (patch) | |
tree | 37ffcf044fd423793a76e3882d07be0dd811d3fa /libphobos/libdruntime | |
parent | e6cbe9654d14588f8bcaf267730fa4c694216eee (diff) | |
download | gcc-cd08718d57d1552fa2dbca96809e4915559685e7.zip gcc-cd08718d57d1552fa2dbca96809e4915559685e7.tar.gz gcc-cd08718d57d1552fa2dbca96809e4915559685e7.tar.bz2 |
coroutines: Fix handling of ramp return value [PR94661]
Coroutine ramp functions have synthesised return values (the
user-authored function body cannot have an explicit 'return').
The current implementation attempts to optimise by building
the return in-place, in the manner of C++17 code. Clearly,
that was too ambitious and the fix builds a target expr for
the constructed version and passes that to finish_return_stmt.
This also means that we now get the same error messages for
implicit use of deleted CTORs etc.
gcc/cp/ChangeLog:
2020-04-21 Iain Sandoe <iain@sandoe.co.uk>
PR c++/94661
* coroutines.cc (morph_fn_to_coro): Simplify return
value computation.
gcc/testsuite/ChangeLog:
2020-04-21 Iain Sandoe <iain@sandoe.co.uk>
PR c++/94661
* g++.dg/coroutines/ramp-return-a.C: New test.
* g++.dg/coroutines/ramp-return-b.C: New test.
* g++.dg/coroutines/ramp-return-c.C: New test.
Diffstat (limited to 'libphobos/libdruntime')
0 files changed, 0 insertions, 0 deletions