From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 74E1C3882108; Thu, 13 Jun 2024 11:33:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74E1C3882108 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718278415; bh=tF+1cfW5+qGhduvoY/ItQjYJhSU3mmQlf17+c+Lae10=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wh/w+D6o3xMxVuFHO/nbsSuAQwwtJmjtjIFFfcKLw3P15dDPdGo4jCg4UW1XHBjvx yfO6IpD6087QFJldXuGnNYjEZzGxeTaZ3lNZwY9FrEA7s+LCcCsDMidv5fDJtQp/p7 eqpuGxUUm3PyH14GKZXWZeMCOYK0xhSsmKyFE21M= From: "blubban at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115318] decltype(lambda) from an template function inside a templated lambda causes ICE Date: Thu, 13 Jun 2024 11:33:34 +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.1.0 X-Bugzilla-Keywords: c++-lambda, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: blubban at gmail dot com 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=3D115318 --- Comment #2 from Alfred Agrell --- struct a { int c; }; template struct ddd { int f() { using a2 =3D decltype([](int a::*)->a{}(&a::c)); return [](int a2::*){ return 2; }(&a::c); } }; int xs() { return ddd().f(); } -std=3Dc++20 again -> :8:16: sorry, unimplemented: mangling offset_ref https://godbolt.org/z/4M3ToqqPW Adding a to the first lambda changes the error to the same ICE as= this issue (https://godbolt.org/z/Pq9T16GvP), so I'm about 98% sure it's the same root cause.=