From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1FB6A3858C5F; Fri, 3 Feb 2023 23:32:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1FB6A3858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675467178; bh=uJyzZN3lej1HV8CS0U1U9cLkn3dHEOM7c8HYZu+vmio=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kDcDKEFYq8fBJ4obXO5hmsf2bGydB3Up9Y3+K+feSJ7iNk9uk71HQgytqWdBM+1Bg kSXpEIxJtFgLwuhXdckkMbggPe48g3Zj2oVmyzg62TFcLpmMKSeRlZ6FIV4v7R8KEt I6f8bZPekeYY74mP/Svd6N8b82ds/MFKTc5xK0tE= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107079] [10/11/12/13 Regression] ICE initializing lifetime-extended constexpr variable that stores its this pointer Date: Fri, 03 Feb 2023 23:32:57 +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-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: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107079 --- Comment #3 from Marek Polacek --- The cxx_constant_init call actually takes decl=3Dx so we should probably use that. value =3D cxx_constant_init (value, decl); However, in cxx_eval_outermost_constant_expr type is const struct X & and s= o we don't set up ctx.object.=