public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105475] New: ICE in coerce_template_parms, at cp/pt.cc:9183
@ 2022-05-04 10:22 asolokha at gmx dot com
2022-05-04 10:39 ` [Bug c++/105475] " marxin at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: asolokha at gmx dot com @ 2022-05-04 10:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105475
Bug ID: 105475
Summary: ICE in coerce_template_parms, at cp/pt.cc:9183
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: C++-Coroutine, ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
g++ 13.0.0 20220501 snapshot (g:75bbc3da3e5f75f683fa33e309045c582efd20eb) ICEs
when compiling test/CodeGenCoroutines/coro-newpm-pipeline.cpp or
test/CodeGenCoroutines/coro-always-inline.cpp w/ -fcoroutines:
namespace std {
struct handle {};
struct awaitable {
bool await_ready() noexcept { return false; }
void await_suspend(handle) noexcept {}
bool await_resume() noexcept { return true; }
};
template <typename T> struct coroutine_handle {
static handle from_address(void *address) noexcept { return {}; }
};
template <typename T = void> struct coroutine_traits {
struct promise_type {
awaitable initial_suspend() { return {}; }
awaitable final_suspend() noexcept { return {}; }
void return_void() {}
T get_return_object() { return T(); }
void unhandled_exception() {}
};
};
} // namespace std
void foo() { co_return; }
% g++-13.0.0 -fcoroutines -c test/CodeGenCoroutines/coro-newpm-pipeline.cpp
test/CodeGenCoroutines/coro-newpm-pipeline.cpp: In function 'void foo()':
test/CodeGenCoroutines/coro-newpm-pipeline.cpp:43:14: internal compiler error:
in coerce_template_parms, at cp/pt.cc:9183
43 | void foo() { co_return; }
| ^~~~~~~~~
0x706e6c coerce_template_parms
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/pt.cc:9183
0xb532b5 lookup_template_class_1
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/pt.cc:9966
0xb55150 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/pt.cc:10353
0x9adfce instantiate_coro_handle_for_promise_type
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/coroutines.cc:400
0x9b099e coro_promise_type_found_p
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/coroutines.cc:455
0x9b277b finish_co_return_stmt(unsigned int, tree_node*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/coroutines.cc:1331
0xadbc28 cp_parser_jump_statement
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:14303
0xadbc28 cp_parser_statement
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:12312
0xadbd7d cp_parser_statement_seq_opt
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:12850
0xadbe57 cp_parser_compound_statement
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:12802
0xafca45 cp_parser_function_body
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:25076
0xafca45 cp_parser_ctor_initializer_opt_and_function_body
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:25127
0xafd9fa cp_parser_function_definition_after_declarator
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:31259
0xafecb8 cp_parser_function_definition_from_specifiers_and_declarator
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:31175
0xafecb8 cp_parser_init_declarator
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:22598
0xad87f9 cp_parser_simple_declaration
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:15280
0xb09f85 cp_parser_declaration
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:14966
0xb0a969 cp_parser_toplevel_declaration
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:14987
0xb0a969 cp_parser_translation_unit
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:5010
0xb0a969 c_parse_file()
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220501/work/gcc-13-20220501/gcc/cp/parser.cc:48113
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/105475] ICE in coerce_template_parms, at cp/pt.cc:9183
2022-05-04 10:22 [Bug c++/105475] New: ICE in coerce_template_parms, at cp/pt.cc:9183 asolokha at gmx dot com
@ 2022-05-04 10:39 ` marxin at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-04 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105475
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
CC| |iains at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Last reconfirmed| |2022-05-04
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
It's there since the beginning of coroutines (r10-6063-g49789fd08378e3ff).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-04 10:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 10:22 [Bug c++/105475] New: ICE in coerce_template_parms, at cp/pt.cc:9183 asolokha at gmx dot com
2022-05-04 10:39 ` [Bug c++/105475] " marxin at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).