aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-06-27 08:18:34 +0100
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:15:08 -0300
commitbadd0f254d890ce04a8aa3b8d055e48c71ef2216 (patch)
treeaa113af82ceab5718da5da89d8f3b9658d2a6c54 /gcc/fortran
parent1861354754940214d12b04de0685c6ebd35cf28f (diff)
downloadgcc-badd0f254d890ce04a8aa3b8d055e48c71ef2216.zip
gcc-badd0f254d890ce04a8aa3b8d055e48c71ef2216.tar.gz
gcc-badd0f254d890ce04a8aa3b8d055e48c71ef2216.tar.bz2
coroutines: Handle awaiters that are sub-objects [PR95736]
Move deciding on initializers for awaitables to the build of the co_await, this allows us to analyse cases that do not need a temporary at that point. As the PR shows, the late analysis meant that we were not checking properly for the case that an awaiter is a sub-object of an existing variable outside the current function scope (and therefore does not need to be duplicated in the frame). gcc/cp/ChangeLog: PR c++/95736 * coroutines.cc (get_awaitable_var): New helper. (build_co_await): Check more carefully before copying an awaitable. (expand_one_await_expression): No initializer is required when the awaitable is not a temp. (register_awaits): Remove handling that is now completed when the await expression is built. gcc/testsuite/ChangeLog: PR c++/95736 * g++.dg/coroutines/pr95736.C: New test.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions