[Bug c++/94661] coroutine ramp function return value ICE for default copy CTOR.
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 21 10:09:16 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94661
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:
https://gcc.gnu.org/g:cd08718d57d1552fa2dbca96809e4915559685e7
commit r10-7842-gcd08718d57d1552fa2dbca96809e4915559685e7
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Tue Apr 21 10:35:13 2020 +0100
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.
More information about the Gcc-bugs
mailing list