* varasm.c (globalize_decl): New fn.
(assemble_start_function): Use it.
(asm_emit_uninitialized): Use it.
(assemble_alias): Use it.
(assemble_variable): Use it.
From-SVN: r50738
--- /dev/null
+#include "comdat3.h"
+
+void f ()
+{
+ const bool *p = &A<int>::b;
+}
--- /dev/null
+// Test that duplicate elimination of implicit instantiations of static
+// data members works properly.
+
+// Additional sources: comdat3-aux.cc
+// Additional files: comdat3.h
+
+#include "comdat3.h"
+
+int main ()
+{
+ const bool *p = &A<int>::b;
+ f ();
+}
--- /dev/null
+template <class T> struct A {
+ static const bool b = false;
+};
+
+template <class T>
+const bool A<T>::b;
+
+void f ();