aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-04-30 10:42:36 +0100
committerIain Sandoe <iain@sandoe.co.uk>2020-04-30 16:00:39 +0100
commit448c89d590455ed4ab7abc40309b5cf8ec52d13d (patch)
tree61c760c016575511ea8afc83832ea9e1fd5fc36d /gcc/cse.c
parentaa94a22f5cb337e173d7119ffd5a92f1e607f544 (diff)
downloadgcc-448c89d590455ed4ab7abc40309b5cf8ec52d13d.zip
gcc-448c89d590455ed4ab7abc40309b5cf8ec52d13d.tar.gz
gcc-448c89d590455ed4ab7abc40309b5cf8ec52d13d.tar.bz2
coroutines: Fix handling of artificial vars [PR94886]
The testcase ICEs because the range-based for generates three artificial variables that need to be allocated to the coroutine frame but, when walking the BIND_EXR that contains these, the DECL_INITIAL for one of them refers to an entry appearing later, which means that the frame entry hasn't been allocated when that INITIAL is walked. The solution is to defer walking the DECL_INITIAL/SIZE etc. until all the BIND_EXPR vars have been processed. gcc/cp/ChangeLog: 2020-04-30 Iain Sandoe <iain@sandoe.co.uk> PR c++/94886 * coroutines.cc (transform_local_var_uses): Defer walking the DECL_INITIALs of BIND_EXPR vars until all the frame allocations have been made. gcc/testsuite/ChangeLog: 2020-04-30 Iain Sandoe <iain@sandoe.co.uk> PR c++/94886 * g++.dg/coroutines/pr94886-folly-3.C: New test.
Diffstat (limited to 'gcc/cse.c')
0 files changed, 0 insertions, 0 deletions