From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 87C743858D3C; Mon, 20 Nov 2023 05:05:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87C743858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700456748; bh=vjhaaa5HJ0mvqffNHDoK/q0289qh5lBUdvcxMDj0bHk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=x3PbuI9VEu0b00BARFql+CNCHGaGaEhpe4n3qIsXQPznzLbLxD2kbmo+m3iMIcfLA jJICnLgzihl/ezxVwO9vhyTLVZLXNfd1u8tT4+BiftXuABh/HDrN1byLrfSqbMpOvE 9Z2/q1KEoc0zZsHKkJVcFZ1dWm8fr4VmCmh5zNQ8= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112594] Non-type template parameter created with converting constructor sometimes has original type Date: Mon, 20 Nov 2023 05:05:48 +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: 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: bug_status everconfirmed cf_reconfirmed_on 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=3D112594 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2023-11-20 --- Comment #1 from Andrew Pinski --- Confirmed. This fails in a similar way so it is not related to i being static here: ``` template concept C =3D true; struct n { constexpr n(int a) : i(a) {} int i; }; template using get_n_i_type =3D decltype(N.i); template int f() { using iii =3D get_n_i_type; #if 1 // Change to 0 and this compiles static_assert(C); #endif return iii{}; } template int f<3>(); ``` I will file another related bug seperately which seems like a regression on= the trunk.=