[Bug c++/99066] [8/9/10/11 Regression] non-weak definition emitted for explicit instantiation declaration

2021-04-05 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99066

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Jason Merrill :

https://gcc.gnu.org/g:bd89b8fe9efbdf0a95d827553d1a84fd3cefaa16

commit r11-7986-gbd89b8fe9efbdf0a95d827553d1a84fd3cefaa16
Author: Jason Merrill 
Date:   Sun Apr 4 23:32:32 2021 -0400

c++: extern template and static data member [PR99066]

'extern template' should mean that the relevant symbols are never emitted.
But in this case we were assuming that DECL_EXTERNAL was already set on the
variable, so we just needed to clear DECL_NOT_REALLY_EXTERN.  Since
DECL_EXTERNAL was not set, we emitted a definition of npos.

gcc/cp/ChangeLog:

PR c++/99066
* pt.c (mark_decl_instantiated): Set DECL_EXTERNAL.

gcc/testsuite/ChangeLog:

PR c++/99066
* g++.dg/cpp0x/extern_template-6.C: New test.

[Bug c++/99066] [8/9/10/11 Regression] non-weak definition emitted for explicit instantiation declaration

2021-04-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99066

--- Comment #3 from Jason Merrill  ---
(In reply to Jakub Jelinek from comment #2)
> Perhaps caused by PR23691 changes?

r104041, yes.  Bizarre that this went unnoticed for over 15 years.

[Bug c++/99066] [8/9/10/11 Regression] non-weak definition emitted for explicit instantiation declaration

2021-04-04 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99066

Jason Merrill  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Status|NEW |ASSIGNED

[Bug c++/99066] [8/9/10/11 Regression] non-weak definition emitted for explicit instantiation declaration

2021-02-10 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99066

Jakub Jelinek  changed:

   What|Removed |Added

   Last reconfirmed||2021-02-10
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

--- Comment #2 from Jakub Jelinek  ---
Perhaps caused by PR23691 changes?

[Bug c++/99066] [8/9/10/11 Regression] non-weak definition emitted for explicit instantiation declaration

2021-02-10 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99066

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P2
Summary|non-weak definition emitted |[8/9/10/11 Regression]
   |for explicit instantiation  |non-weak definition emitted
   |declaration |for explicit instantiation
   ||declaration
   Target Milestone|--- |8.5