From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 57F313858C36; Mon, 10 Jul 2023 05:47:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57F313858C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688968054; bh=TaS+ccM46jVmOgyfTEMe5QG+qmXgrg19uIrmioZ3WsE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Np04LNAFKkMvbRd9tK95S8Abqav0NHxw9xwF+cqXh4schJNZiOd4u8S/uW48k5T3k M1ot5ey2c2oDkh4fdZNpaoMCC/U3AXstPZeSjvAi22KSdVCLjIqD1ire06c1AkRcEe 3O0nJFbT30aGvAIfnt+7Wu53mXAdsanYYx93lR7A= 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:47:33 +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: 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| |wrong-code --- Comment #5 from Andrew Pinski --- Here is another testcase: ``` struct s0 {}; struct s1 {}; template struct t { static constexpr bool v =3D false; }; template<> struct t { static constexpr bool v =3D true; }; template =20 struct s3 { template static constexpr bool __usable_key =3D t<_Vp>::v; static_assert(__usable_key); static_assert(!__usable_key); }; s3 t2; ``` I get the feeling _Up in the default template argument of __usable_key is being replaced with _Key template argument for some reason.=