From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 53C6A3858C52; Mon, 18 Apr 2022 06:19:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53C6A3858C52 From: "asolokha at gmx dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: C++-Coroutine, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: asolokha at gmx dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2022 06:19:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105301 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=3D52825&action=3Dedit Testcase g++ 12.0.1 20220417 snapshot (g:000c1b89d259fadb466e1f2e63c79da45fd17372) I= CEs 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_implicit_return()': lvhljakz.cpp:43:21: error: the coroutine promise type 'std::coroutine_traits >::promise_type' {aka 'bad_promise_6'} declares both 'return_value' and 'return_void' 43 | coro 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_implicit_return() { co_await a; } | ^ 0x8796d0 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/tr= ee.cc:8972 0x692cd6 contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/tr= ee.h:3571 0x692cd6 coro_promise_type_found_p =20=20=20=20=20=20=20 /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*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /coroutines.cc:1165 0xaf9271 cp_parser_unary_expression =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /parser.cc:8866 0xac7237 cp_parser_binary_expression =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /parser.cc:10035 0xac7e2e cp_parser_assignment_expression =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /parser.cc:10339 0xac991c cp_parser_expression =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /parser.cc:10509 0xacd017 cp_parser_expression_statement =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /parser.cc:12705 0xada2ca cp_parser_statement =20=20=20=20=20=20=20 /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 =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /parser.cc:12850 0xadb537 cp_parser_compound_statement =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /parser.cc:12802 0xafc145 cp_parser_function_body =20=20=20=20=20=20=20 /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 =20=20=20=20=20=20=20 /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 =20=20=20=20=20=20=20 /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 =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /parser.cc:31167 0xafe3b8 cp_parser_init_declarator =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /parser.cc:22591 0xad7ee9 cp_parser_simple_declaration =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /parser.cc:15280 0xb09675 cp_parser_declaration =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /parser.cc:14966 0xb0a039 cp_parser_toplevel_declaration =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.1_p20220417/work/gcc-12-20220417/gcc/cp= /parser.cc:14987=