From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 014163858C31; Mon, 10 Jul 2023 05:53:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 014163858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688968423; bh=T90Oe29bV9L3R4b8aTsLgx9T702+syb8/OO3lpemEGk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dSqk35zo5DWnOXHMc6SwWiAwMm+HdgdVo0RG8VwqF2QWXficN7owoJl7ZHuOSMgSu 6VkmXwQKkdqnUV0D2zMM0m7ZivNh2Mn7n22RHsnYqu3CXjqshT7Gto7pLngKYd9yVK N0Bi9y11TErpOHmBKP9JTWFwXzvv0YUtH1AAE7Lw= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110580] [14 Regression] gcc fails to typecheck nix-2.16.1 source: error: invalid initialization of reference of type Date: Mon, 10 Jul 2023 05:53:42 +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: accepts-invalid, needs-bisection, rejects-valid, wrong-code 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: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D110580 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid --- Comment #6 from Andrew Pinski --- yes my theory is correct and becomes obvious with the error message for: ``` struct s0 {}; struct s1 {}; struct s2 {}; template struct t; template =20 struct s3 { template static constexpr bool __usable_key =3D t<_Vp>::v; static_assert(__usable_key); static_assert(__usable_key); }; s3 t2; ``` Error message: ``` : In instantiation of 'constexpr const bool s3::__usable_key': ... : In instantiation of 'constexpr const bool s3::__usable_key': ``` s2 there is definitely incorrect=