Handle CO_AWAIT_EXPR in conversion in co_await_expander.
authorBin Cheng <bin.cheng@linux.alibaba.com>
Thu, 30 Jan 2020 04:10:36 +0000 (12:10 +0800)
committerBin Cheng <bin.cheng@linux.alibaba.com>
Thu, 30 Jan 2020 04:35:46 +0000 (12:35 +0800)
commit3b35b3d4cc26816d1c6342b880f303b577ecbb84
treed738593ac0d2e49e22d4143489b689e037e5ea67
parent66af5a226acd0edfbafcbcac76ed268cee0612ed
Handle CO_AWAIT_EXPR in conversion in co_await_expander.

Function co_await_expander expands CO_AWAIT_EXPR and inserts expanded
code before result of co_await is used, however, it doesn't cover the
type conversion case and leads to gimplify ICE.  This patch fixes it.

gcc/cp
    * coroutines.cc (co_await_expander): Handle type conversion case.

gcc/testsuite
    * g++.dg/coroutines/co-await-syntax-09-convert.C: New test.
gcc/cp/ChangeLog
gcc/cp/coroutines.cc
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/coroutines/co-await-syntax-09-convert.C [new file with mode: 0644]