From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7DA063858C54; Mon, 27 Mar 2023 19:00:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7DA063858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679943606; bh=ZyGmJwa3Z8dTLa72lc/73yYC2xkQqtEHGQrVS68n3Cw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=j1kCQ3VhAh/IkLAyc9GccQ0N61wpU5RWW2UK6PESTN3ulYBAsyPoShvozSZdQV1wf UEd5rzQ+E/N7yGBmwGL8PUHFRZ06kpEPBbIiMJ/1HNgCiYheOD35KrUaRG7+Dd/pK3 dAnQ3VpZbX4959UDP0bh4CnlX59iTzhNcN9RlJFQ= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109300] [13 Regression] ICE in cp_finish_decl, at cp/decl.cc:8279 Date: Mon, 27 Mar 2023 19:00:06 +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: 13.0 X-Bugzilla-Keywords: ice-on-invalid-code, needs-bisection 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: cf_reconfirmed_on bug_status everconfirmed keywords 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=3D109300 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-03-27 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Keywords|ice-on-valid-code |ice-on-invalid-code, | |needs-bisection --- Comment #1 from Andrew Pinski --- Note I think this is invalid code. With an instantation, GCC 12 (and before) does reject it: ``` template auto x =3D [](){ x(); }; auto y =3D x; ``` ``` : In instantiation of 'auto x': :3:10: required from here :2:16: error: use of 'x' before deduction of 'auto' 2 | auto x =3D [](){ x(); }; | ^~~~~~ :2:6: error: 'x' has incomplete type 2 | auto x =3D [](){ x(); }; | ^ :2:22: error: invalid use of 'auto' 2 | auto x =3D [](){ x(); }; | ~~~~~~^~ ``` Note clang rejects it even without an instantation.=