From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B638C38618EE; Tue, 30 Mar 2021 20:58:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B638C38618EE From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99833] [8/9/10/11 Regression] structured binding + if init + generic lambda = internal compiler error Date: Tue, 30 Mar 2021 20:58:21 +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: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek 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: 8.5 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 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: Tue, 30 Mar 2021 20:58:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99833 --- Comment #3 from Marek Polacek --- Reduced: namespace std { template struct integral_constant { static constexpr int value =3D __v; }; template struct tuple_size; template struct tuple_element; template using __tuple_element_t =3D typename tuple_element<__i, _Tp>::type; template class tuple; template tuple(_UTypes...) -> tuple<_UTypes...>; template class tuple<_T1, _T2> { public: template tuple(_U1, _U2); }; template struct tuple_size> : integral_constant {}; template struct tuple_element<__i, tuple<_Head, _Tail...>> : tuple_element<__i - 1, tuple<_Tail...>> {}; template struct tuple_element<0, tuple<_Head, _Tail...>> { typedef _Head type; }; template __tuple_element_t<__i, tuple<_Elements...>> get(tuple<_Elements...>); } // namespace std void f(auto x) { [&](auto...) { auto y =3D std::tuple{"", x}; if constexpr (auto [_, z] =3D y; requires { z; }) ; }(); } auto main() -> int { f(2); }=