public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114013] New: [14 Regression] Specializations of var templates no longer emitted since r14-8987 Date: Tue, 20 Feb 2024 16:35:15 +0000 [thread overview] Message-ID: <bug-114013-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114013 Bug ID: 114013 Summary: [14 Regression] Specializations of var templates no longer emitted since r14-8987 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- struct S { int a, b; }; template <int N> constexpr struct S var[16] = {}; template <> constexpr inline struct S var<6>[8] = { { 1, 1 }, { 2, 0 }, { 3, 1 }, { 4, 0 }, { 5, 1 }, { 6, 0 }, { 7, 1 }, { 8, 0 } }; [[gnu::noipa]] void foo (S) { } template <int N> void bar (int x) { foo (var<N>[x]); } volatile int x; int main () { bar <6> (x); } extracted from mesa no longer links starting with r14-8987-gdd9d14f7d53de07beff06004922a2bff20ece671 (-O0 or -O2, doesn't matter). /usr/bin/ld: /tmp/cc4Mqq20.o: in function `void bar<6>(int)': mesa.C:(.text._Z3barILi6EEvi[_Z3barILi6EEvi]+0x14): undefined reference to `var<6>' collect2: error: ld returned 1 exit status
next reply other threads:[~2024-02-20 16:35 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-20 16:35 jakub at gcc dot gnu.org [this message] 2024-02-20 16:36 ` [Bug c++/114013] " jakub at gcc dot gnu.org 2024-02-20 17:53 ` jakub at gcc dot gnu.org 2024-02-20 17:54 ` jakub at gcc dot gnu.org 2024-02-27 16:44 ` enrico.seiler+gccbugs at outlook dot com 2024-02-28 0:26 ` cvs-commit at gcc dot gnu.org 2024-02-28 10:17 ` jakub at gcc dot gnu.org
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-114013-4@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).