From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6339A3AA0066; Fri, 23 Apr 2021 15:39:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6339A3AA0066 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100234] New: [11/12 Regression] Coroutines ICE Date: Fri, 23 Apr 2021 15:39:28 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org 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 bug_severity priority component assigned_to reporter target_milestone 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: Fri, 23 Apr 2021 15:39:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100234 Bug ID: 100234 Summary: [11/12 Regression] Coroutines ICE Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- Starting with r11-2183-g0f66b8486cea8668020e4bd48f261b760cb579be the following testcase ICEs with -std=3Dc++20 -fcoroutines: rh1952671.C: In member function =E2=80=98K L::bar()=E2=80=99: rh1952671.C:44:41: internal compiler error: tree check: expected record_typ= e or union_type or qual_union_type, have array_type in build_special_member_call= , at cp/call.c:9758 44 | K bar () { co_await foo (C(), {C()}); } | ^ 0x1a5f2ac tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/tree.c:9687 0x958126 tree_check3(tree_node*, char const*, int, char const*, tree_code, tree_code, tree_code) ../../gcc/tree.h:3343 0x94b8b3 build_special_member_call(tree_node*, tree_node*, vec**, tree_node*, int, int) ../../gcc/cp/call.c:9758 0x9d8490 flatten_await_stmt ../../gcc/cp/coroutines.cc:2859 namespace std { template class initializer_list { int *a; decltype(sizeof 0) b; }; } struct C { C(); }; struct D { D(std::initializer_list); }; namespace std { template struct coroutine_traits : e {}; template struct coroutine_handle { operator coroutine_handle<>(); }; } struct F { void await_ready(); void await_suspend(std::coroutine_handle<>); void await_resume(); }; struct M { void await_ready() noexcept; template void await_suspend(h) noexcept; void await_resume() noexcept; }; struct I { F initial_suspend(); auto final_suspend() noexcept { return M{}; } }; struct K { struct J : public I { void unhandled_exception(); // K get_return_object() { return K{}; } }; using promise_type =3D J; }; struct Q { Q(int); void await_ready(); void await_resume(); void await_suspend(std::coroutine_handle<>); }; Q foo (C, D); struct L { K bar () { co_await foo (C(), {C()}); } }; while before that commit it has been rejected with rh1952671.C: In member function =E2=80=98K L::bar()=E2=80=99: rh1952671.C:44:5: error: no member named =E2=80=98get_return_object=E2=80= =99 in =E2=80=98K::promise_type=E2=80=99 {aka =E2=80=98K::J=E2=80=99} 44 | K bar () { co_await foo (C(), {C()}); } | ^~~=