[Bug c++/114013] [14 Regression] Specializations of var templates no longer emitted since r14-8987
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114013 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Jakub Jelinek --- Fixed.
[Bug c++/114013] [14 Regression] Specializations of var templates no longer emitted since r14-8987
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114013 --- Comment #4 from GCC Commits --- The master branch has been updated by Nathaniel Shead : https://gcc.gnu.org/g:615b62aada6cc42759e5c43e196dab6c524925d6 commit r14-9201-g615b62aada6cc42759e5c43e196dab6c524925d6 Author: Nathaniel Shead Date: Wed Feb 28 11:20:53 2024 +1100 c++: Revert deferring emission of inline variables [PR114013] This is a (partial) reversion of r14-8987-gdd9d14f7d53 to return to eagerly emitting inline variables to the middle-end when they are declared. 'import_export_decl' will still continue to accept them, as allowing this is a pure extension and doesn't seem to cause issues with modules, but otherwise deferring the emission of inline variables appears to cause issues on some targets and prevents some code using inline variable templates from correctly linking. There might be a more targetted way to support this, but due to the complexity of handling linkage and emission I'd prefer to wait till GCC 15 to explore our options. PR c++/113970 PR c++/114013 gcc/cp/ChangeLog: * decl.cc (make_rtl_for_nonlocal_decl): Don't defer inline variables. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/inline-var10.C: New test. Signed-off-by: Nathaniel Shead
[Bug c++/114013] [14 Regression] Specializations of var templates no longer emitted since r14-8987
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114013 --- Comment #3 from Enrico Seiler --- For -O0 and -O1, this also does not link: template int value; template <> inline int value<1>; void bar(int) { bar(value<1>); } https://godbolt.org/z/Wxv7PE8ob
[Bug c++/114013] [14 Regression] Specializations of var templates no longer emitted since r14-8987
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114013 --- Comment #2 from Jakub Jelinek --- And it behaves the same way even if there is template constexpr inline struct S var[8] = {}; instead.
[Bug c++/114013] [14 Regression] Specializations of var templates no longer emitted since r14-8987
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114013 --- Comment #1 from Jakub Jelinek --- s/16/8/, sorry for the leftover from earlier larger version.
[Bug c++/114013] [14 Regression] Specializations of var templates no longer emitted since r14-8987
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114013 Jakub Jelinek changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed||2024-02-20 Target Milestone|--- |14.0 Priority|P3 |P1 CC||jason at gcc dot gnu.org, ||nshead at gcc dot gnu.org, ||ppalka at gcc dot gnu.org Status|UNCONFIRMED |NEW