]> gcc.gnu.org Git - gcc.git/commit
coroutines: Update TREE_SIDE_EFFECTS on inserted bind exprs.
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 10 May 2020 13:20:13 +0000 (14:20 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 10 May 2020 15:55:55 +0000 (16:55 +0100)
commitf09d898296c02d023ec51489fd233075ac553fd4
tree9dc14b24f68980afd08355a63f50292243dd1956
parent6a05439351bf17242026905a0a45c56c3cab7874
coroutines: Update TREE_SIDE_EFFECTS on inserted bind exprs.

There are several places where we insert bind expressions while
making the coroutine AST transforms.  These should be marked as
having side-effects where relevant, which had been omitted.  This
leads to at least one failure in the cppcoros test suite, where a loop
body is dropped in gimplification because it is not marked.

gcc/cp/ChangeLog:

2020-05-10  Iain Sandoe  <iain@sandoe.co.uk>

Backported from mainline
2020-05-08  Iain Sandoe  <iain@sandoe.co.uk>

PR c++/95003
* coroutines.cc (build_actor_fn): Ensure that bind scopes
are marked as having side-effects where necessary.
(replace_statement_captures): Likewise.
(morph_fn_to_coro): Likewise.

gcc/testsuite/ChangeLog:

2020-05-10  Iain Sandoe  <iain@sandoe.co.uk>

Backported from mainline
2020-05-08  Iain Sandoe  <iain@sandoe.co.uk>

PR c++/95003
* g++.dg/coroutines/torture/pr95003.C: New test.
gcc/cp/ChangeLog
gcc/cp/coroutines.cc
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/coroutines/torture/pr95003.C [new file with mode: 0644]
This page took 0.06451 seconds and 6 git commands to generate.