From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 583CB3858C66; Thu, 18 Jan 2024 03:47:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 583CB3858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705549632; bh=knRtye+pg7h6j7JP9Snb/yL9Zi0StlGbiotzJxFA7qk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ASepyw0LQxLeCoe7ojmdgGuGRGttrbycsNv+EEVMYnIpnDCoSzRvlVI/8FAk3gTpF mMmySEpp9GvLGT5sY05uz0V1lZuIDaDc/cuAalEbzRdbxchM8+c6O/pMgj8kzhH63W r+sThAIZhg16oli/F4Gy1RJgvOZ9XlJGC/Y0NcuA= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113457] Trying to emulate views::concat with std::generator gives ICE on co_yield: "internal compiler error: in canonicalize_component_ref, at gimplify.cc" Date: Thu, 18 Jan 2024 03:47:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: C++-coroutines, needs-bisection, needs-reduction X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113457 --- Comment #6 from Andrew Pinski --- So you can reproduce it easier without even vector or array: ``` #include using namespace std; template [[nodiscard]] auto concat(Ranges&&... ranges) -> generator { (co_yield ranges::elements_of(ranges), ...); } auto main() -> int { int const numbers1[] =3D {4, 8, 15, 16, 23, 42}; double const numbers2[] =3D {4, 8, 15, 16, 23, 42}; return *concat(numbers1, numbers2).begin(); } ```=