Commit 346eeb15 by Jason Merrill

re PR c++/10968 (If member function implicitly instantiated, explicit…

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
parent aa9b0aca
......@@ -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;
......
// 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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment