PR c++/45651
* pt.c (instantiate_decl): Don't clear DECL_INTERFACE_KNOWN on
!TREE_PUBLIC decls.
From-SVN: r170781
+2011-03-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/45651
+ * pt.c (instantiate_decl): Don't clear DECL_INTERFACE_KNOWN on
+ !TREE_PUBLIC decls.
+
2011-03-08 Dodji Seketeli <dodji@redhat.com>
PR c++/47957
if (!pattern_defined && expl_inst_class_mem_p
&& DECL_EXPLICIT_INSTANTIATION (d))
{
- DECL_NOT_REALLY_EXTERN (d) = 0;
- DECL_INTERFACE_KNOWN (d) = 0;
+ /* Leave linkage flags alone on instantiations with anonymous
+ visibility. */
+ if (TREE_PUBLIC (d))
+ {
+ DECL_NOT_REALLY_EXTERN (d) = 0;
+ DECL_INTERFACE_KNOWN (d) = 0;
+ }
SET_DECL_IMPLICIT_INSTANTIATION (d);
}
+2011-03-08 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/template/anon5.C: New.
+
2011-03-08 Jakub Jelinek <jakub@redhat.com>
PR debug/47881
--- /dev/null
+// PR c++/45651
+
+namespace { template <int T> struct A {}; }
+template <int T> struct B { void f(A<T>); };
+template struct B<1>;
+template<int T> void B<T>::f(A<T>) {}