public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "lh_mouse at 126 dot com" <gcc-bugzilla@gcc.gnu.org> 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 [thread overview] Message-ID: <bug-109464-4-WdCCoxf3gH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109464-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109464 LIU Hao <lh_mouse at 126 dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |10.4.0, 9.5.0 --- Comment #4 from LIU Hao <lh_mouse at 126 dot com> --- Manually reduced testcase: (godbolt: https://gcc.godbolt.org/z/YsaoM78vM) ``` template<typename T> struct shallow { int len; constexpr shallow() : len(0) { } }; template<typename T> struct use_shallow { static constexpr shallow<T> s_zstr = { }; static_assert(s_zstr.len == 0); }; extern template struct shallow<char>; extern template struct use_shallow<char>; template struct shallow<char>; template struct use_shallow<char>; ``` Constructor of `shallow` is lost. All GCC versions are affected.
next prev parent reply other threads:[~2023-04-11 4:44 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-10 14:15 [Bug c++/109464] New: " lh_mouse at 126 dot com 2023-04-10 20:50 ` [Bug c++/109464] " pinskia at gcc dot gnu.org 2023-04-11 3:50 ` lh_mouse at 126 dot com 2023-04-11 3:55 ` pinskia at gcc dot gnu.org 2023-04-11 4:44 ` lh_mouse at 126 dot com [this message] 2023-04-11 6:16 ` lh_mouse at 126 dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-109464-4-WdCCoxf3gH@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).