public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105301] New: [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516 Date: Mon, 18 Apr 2022 06:19:04 +0000 [thread overview] Message-ID: <bug-105301-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105301 Bug ID: 105301 Summary: [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516 Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: C++-Coroutine, ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com CC: iains at gcc dot gnu.org Target Milestone: --- Created attachment 52825 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52825&action=edit Testcase g++ 12.0.1 20220417 snapshot (g:000c1b89d259fadb466e1f2e63c79da45fd17372) ICEs when compiling the attached testcase, reduced from clang/testsuite/SemaCXX/coroutines.cpp from the clang 14.0.1 test suite, w/ -fcoroutines: % g++-12.0.1 -fcoroutines -c lvhljakz.cpp lvhljakz.cpp: In function 'coro<bad_promise_6> bad_implicit_return()': lvhljakz.cpp:43:21: error: the coroutine promise type 'std::coroutine_traits<coro<bad_promise_6> >::promise_type' {aka 'bad_promise_6'} declares both 'return_value' and 'return_void' 43 | coro<bad_promise_6> bad_implicit_return() { co_await a; } | ^~~~~~~~~~~~~~~~~~~ lvhljakz.cpp:39:8: note: 'return_void' declared here 39 | void return_void(); | ^~~~~~~~~~~ lvhljakz.cpp:43:54: internal compiler error: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in coro_promise_type_found_p, at cp/coroutines.cc:516 43 | coro<bad_promise_6> bad_implicit_return() { co_await a; } | ^ 0x8796d0 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/tree.cc:8972 0x692cd6 contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/tree.h:3571 0x692cd6 coro_promise_type_found_p /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/coroutines.cc:516 0x9b2693 finish_co_await_expr(unsigned int, tree_node*) /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/coroutines.cc:1165 0xaf9271 cp_parser_unary_expression /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:8866 0xac7237 cp_parser_binary_expression /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:10035 0xac7e2e cp_parser_assignment_expression /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:10339 0xac991c cp_parser_expression /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:10509 0xacd017 cp_parser_expression_statement /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:12705 0xada2ca cp_parser_statement /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:12501 0xadb45d cp_parser_statement_seq_opt /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:12850 0xadb537 cp_parser_compound_statement /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:12802 0xafc145 cp_parser_function_body /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:25069 0xafc145 cp_parser_ctor_initializer_opt_and_function_body /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:25120 0xafd0fa cp_parser_function_definition_after_declarator /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:31251 0xafe3b8 cp_parser_function_definition_from_specifiers_and_declarator /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:31167 0xafe3b8 cp_parser_init_declarator /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:22591 0xad7ee9 cp_parser_simple_declaration /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:15280 0xb09675 cp_parser_declaration /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:14966 0xb0a039 cp_parser_toplevel_declaration /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp/parser.cc:14987
next reply other threads:[~2022-04-18 6:19 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-18 6:19 asolokha at gmx dot com [this message] 2022-04-18 9:47 ` [Bug c++/105301] " iains at gcc dot gnu.org 2022-04-18 12:36 ` [Bug c++/105301] [11/12 " jakub at gcc dot gnu.org 2022-04-18 14:07 ` iains at gcc dot gnu.org 2022-04-21 7:51 ` rguenth at gcc dot gnu.org 2022-04-28 12:52 ` cvs-commit at gcc dot gnu.org 2022-04-28 13:00 ` [Bug c++/105301] [11 " iains at gcc dot gnu.org 2023-05-29 10:06 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105301-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).