re PR c++/10968 (If member function implicitly instantiated, explicit instantiation of class fails to instantiate it)

PR c++/10968
        * pt.c (mark_decl_instantiated): Set TREE_SYMBOL_REFERENCED.

[[Split portion of a mixed commit.]]

From-SVN: r67725.2
This commit is contained in:
Jason Merrill 2003-06-10 15:08:46 -04:00
parent aa9b0aca6a
commit 346eeb157e
2 changed files with 9 additions and 0 deletions

View file

@ -9974,6 +9974,9 @@ mark_decl_instantiated (result, extern_p)
set correctly by tsubst. */
TREE_PUBLIC (result) = 1;
/* This might have been set by an earlier implicit instantiation. */
DECL_COMDAT (result) = 0;
if (! extern_p)
{
DECL_INTERFACE_KNOWN (result) = 1;

View file

@ -0,0 +1,6 @@
// Bug 10968: implicit instantiation overrides explicit instantiation
// { dg-final { scan-assembler "_Z1fIiET_S0_" } }
template <class T> T f (T t) { return t; }
inline void g () { f (4); }
template int f (int);