From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 383CB3858D20; Tue, 11 Apr 2023 04:44:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 383CB3858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681188271; bh=FfEwGgKg3meW6hvlfPIWqUCcp6F7WFtpKD6AQWy+G24=; h=From:To:Subject:Date:In-Reply-To:References:From; b=G/eAca9Ot0sbaCI5LQsAYILydrBY8wiEJv/K0o3ORiKlOPzuGnqibEkk7Cc+OL9Gk FefvYS4fPS6ldClvcPW1SV3ZVR/KOAY9NpShEtaRRYsOyGJ9QmnZl+up/7bex5KIAY Xr3x+ErfkBPvHIA6Fgd0WKCiJwbnIKEX62Q2J/jo= From: "lh_mouse at 126 dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109464] gcc does not instantiate constructor for explicitly instantiated template Date: Tue, 11 Apr 2023 04:44:31 +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: 12.2.0 X-Bugzilla-Keywords: link-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: lh_mouse at 126 dot com X-Bugzilla-Status: UNCONFIRMED 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_known_to_fail 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=3D109464 LIU Hao changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |10.4.0, 9.5.0 --- Comment #4 from LIU Hao --- Manually reduced testcase: (godbolt: https://gcc.godbolt.org/z/YsaoM78vM) ``` template struct shallow { int len; constexpr shallow() : len(0) { } }; template struct use_shallow { static constexpr shallow s_zstr =3D { }; static_assert(s_zstr.len =3D=3D 0); }; extern template struct shallow; extern template struct use_shallow; template struct shallow; template struct use_shallow; ``` Constructor of `shallow` is lost. All GCC versions are affected.=