PR c++/37256
* pt.c (instantiate_decl): Don't require a definition of
a template that is explicitly instantiated 'extern'.
From-SVN: r142014
+2008-11-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/37256
+ * pt.c (instantiate_decl): Don't require a definition of
+ a template that is explicitly instantiated 'extern'.
+
2008-11-18 Jason Merrill <jason@redhat.com>
Jakub Jelinek <jakub@redhat.com>
input_location = saved_loc;
if (at_eof && !pattern_defined
- && DECL_EXPLICIT_INSTANTIATION (d))
+ && DECL_EXPLICIT_INSTANTIATION (d)
+ && DECL_NOT_REALLY_EXTERN (d))
/* [temp.explicit]
The definition of a non-exported function template, a
+2008-11-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/37256
+ * g++.dg/cpp0x/extern_template-3.C: New test.
+
2008-11-19 Maxim Kuvyrkov <maxim@codesourcery.com>
* gcc.target/m68k/xgot-1.c (dg-options): Add -O2.
--- /dev/null
+// PR c++/37256
+// { dg-options "-O" }
+
+template <typename T_>
+struct B
+{
+ T_ f();
+};
+
+extern template class B<int>;
+
+void f()
+{
+ B<int> t;
+ t.f();
+}