aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/iresolve.c
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-06-23 10:06:21 +0100
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:14:37 -0300
commit2606d60b46d6dc82307e71d4c2917e3a4d95b6d7 (patch)
tree31232087029b186b201ab2d2ae49a271c035f341 /gcc/fortran/iresolve.c
parent25d86f8553c2d846d03d654e0e8a4a658794f9cc (diff)
downloadgcc-2606d60b46d6dc82307e71d4c2917e3a4d95b6d7.zip
gcc-2606d60b46d6dc82307e71d4c2917e3a4d95b6d7.tar.gz
gcc-2606d60b46d6dc82307e71d4c2917e3a4d95b6d7.tar.bz2
coroutines: Add a cleanup expression for g-r-o when needed [PR95477].
The PR reports that we fail to destroy the object initially created from the get-return-object call. Fixed by adding a cleanup when the DTOR is non-trivial. In addition, to meet the specific wording that the call to get_return_object creates the glvalue for the return, we must construct that in-place in the return object to avoid a second copy/move CTOR. gcc/cp/ChangeLog: PR c++/95477 * coroutines.cc (morph_fn_to_coro): Apply a cleanup to the get return object when the DTOR is non-trivial. gcc/testsuite/ChangeLog: PR c++/95477 * g++.dg/coroutines/pr95477.C: New test. * g++.dg/coroutines/void-gro-non-class-coro.C: New test.
Diffstat (limited to 'gcc/fortran/iresolve.c')
0 files changed, 0 insertions, 0 deletions