aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2021-06-23 08:13:22 +0100
committerIain Sandoe <iain@sandoe.co.uk>2021-07-09 17:43:25 +0100
commit0d5db79a61af150cba48612c9fbc3267262adb93 (patch)
treea335b660790bca16845f6d281d564cd1956ba209
parent41bd1b190358fce213f5add8396faf14a32d5c23 (diff)
downloadgcc-0d5db79a61af150cba48612c9fbc3267262adb93.zip
gcc-0d5db79a61af150cba48612c9fbc3267262adb93.tar.gz
gcc-0d5db79a61af150cba48612c9fbc3267262adb93.tar.bz2
coroutines: Fix a typo in rewriting the function.
When amending the function re-write code, I made a typo in the block connections. This has not shown up in any test fails (as far as can be seen) but is a regression in debug info. Fixed thus. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/cp/ChangeLog: * coroutines.cc (coro_rewrite_function_body): Connect the replacement function block to the block nest correctly.
-rw-r--r--gcc/cp/coroutines.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc
index a1b0b31..f5ae2d6 100644
--- a/gcc/cp/coroutines.cc
+++ b/gcc/cp/coroutines.cc
@@ -4055,8 +4055,8 @@ coro_rewrite_function_body (location_t fn_start, tree fnbody, tree orig,
BIND_EXPR_BLOCK (first) = replace_blk;
/* The top block has one child, so far, and we have now got a
superblock. */
- BLOCK_SUPERCONTEXT (block) = top_block;
- BLOCK_SUBBLOCKS (top_block) = block;
+ BLOCK_SUPERCONTEXT (replace_blk) = top_block;
+ BLOCK_SUBBLOCKS (top_block) = replace_blk;
}
/* Wrap the function body in a try {} catch (...) {} block, if exceptions