Commit da3933ba by Jason Merrill Committed by Jason Merrill

re PR c++/37256 (extern template / explicit instantiation broken in 4.4.0-pre)

        PR c++/37256
        * pt.c (instantiate_decl): Don't require a definition of
        a template that is explicitly instantiated 'extern'.

From-SVN: r142014
parent 2ad646bd
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>
......
......@@ -15226,7 +15226,8 @@ instantiate_decl (tree d, int defer_ok,
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.
......
// 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();
}
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