PR c++/10968
* pt.c (mark_decl_instantiated): Set TREE_SYMBOL_REFERENCED.
[[Split portion of a mixed commit.]]
From-SVN: r67725.2
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;
--- /dev/null
+// 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);