https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118143
Bug ID: 118143
Summary: coroutines: co_await & co_return in ({ ... }) syntax
cause ICE, internal compiler error: in gimplify_expr
Product: gcc
Version: 14.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: sunsijie at buaa dot edu.cn
Target Milestone: ---
```
#include <coroutine>
struct Task {
struct promise_type {
promise_type() = default;
Task get_return_object() { return
{std::coroutine_handle<promise_type>::from_promise(*this)}; }
void return_void() {}
std::suspend_always initial_suspend() { return {}; }
std::suspend_always final_suspend() noexcept { return {}; }
void unhandled_exception() {}
};
std::coroutine_handle<> handle_ = nullptr;
};
struct Await {
bool await_ready() { return true; }
void await_suspend(std::coroutine_handle<>) {}
void await_resume() {}
};
Task test() {
({
co_await Await{};
co_return;
});
co_return;
}
```
0x2031cbc internal_error(char const*, ...)
???:0
0x77895f fancy_abort(char const*, int, char const*)
???:0
0xc4f914 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4dadd gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4f914 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4dadd gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4dadd gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4f8fe gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4dadd gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4f8fe gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4dadd gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4f8fe gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4dadd gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4f8fe gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc51ede gimplify_body(tree_node*, bool)
???:0
0xc522a0 gimplify_function_tree(tree_node*)
???:0
0xabb457 cgraph_node::analyze()
???:0
0xabe7c1 symbol_table::finalize_compilation_unit()
???:0