PR c++/61659
* pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213311
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-07-30 Jason Merrill <jason@redhat.com>
+
+ PR lto/53808
+ PR c++/61659
+ * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
+
2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57397
}
if (flag_implicit_templates
+ && !is_friend
&& VAR_OR_FUNCTION_DECL_P (decl))
/* Set DECL_COMDAT on template instantiations; if we force
them to be emitted by explicit instantiation or -frepo,
--- /dev/null
+// Make sure we don't mistakenly mark f as DECL_COMDAT.
+// { dg-final { scan-assembler "_Z1fv" } }
+
+void f();
+
+template <class T> struct A
+{
+ friend void f();
+};
+
+A<int> a;
+
+void f() { }