aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-decl.c
diff options
context:
space:
mode:
authorBin Cheng <bin.cheng@linux.alibaba.com>2020-01-30 12:33:47 +0800
committerBin Cheng <bin.cheng@linux.alibaba.com>2020-01-30 12:35:53 +0800
commit3904cc106e394ef2a4621576c9fdd53b597add36 (patch)
tree7753b9740998e68663dc5dbabecd692b61dab80f /gcc/fortran/trans-decl.c
parent3b35b3d4cc26816d1c6342b880f303b577ecbb84 (diff)
downloadgcc-3904cc106e394ef2a4621576c9fdd53b597add36.zip
gcc-3904cc106e394ef2a4621576c9fdd53b597add36.tar.gz
gcc-3904cc106e394ef2a4621576c9fdd53b597add36.tar.bz2
Use promise in coroutine frame in actor function.
By standard, coroutine body should be encapsulated in try-catch block as following: try { // coroutine body } catch(...) { promise.unhandled_exception(); } Given above try-catch block is implemented in the coroutine actor function called by coroutine ramp function, so the promise should be accessed via actor function's coroutine frame pointer argument, rather than the ramp function's coroutine frame variable. This patch cleans code a bit to make fix easy. gcc/cp * coroutines.cc (act_des_fn): New. (morph_fn_to_coro): Call act_des_fn to build actor/destroy decls. Access promise via actor function's frame pointer argument. (build_actor_fn, build_destroy_fn): Use frame pointer argument.
Diffstat (limited to 'gcc/fortran/trans-decl.c')
0 files changed, 0 insertions, 0 deletions