Hi As title. in maybe_promote_captured_temps, we promote captured temporaries and co_await_expr into a new BIND_EXPR. As the BIND_EXPR contains co_await_expr and maybe other function calls, the side effects flag should be set.
This patch fix one mismatch in cppcoro, the testcase comes from cppcoro and is reduced by creduce. Bootstrap and test on X86_64, is it OK? Regards JunMa gcc/cp 2020-02-11 Jun Ma <ju...@linux.alibaba.com> * coroutines.cc (maybe_promote_captured_temps): Set side effects flag for BIND_EXPR. gcc/testsuite 2020-02-11 Jun Ma <ju...@linux.alibaba.com> * g++.dg/coroutines/torture/lambda-10-co-await-lambda.C: New test.