aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2002-03-13 11:03:25 -0500
committerJason Merrill <jason@gcc.gnu.org>2002-03-13 11:03:25 -0500
commit9a789d73d1e3ec0db2755ea8ed4ba3cfc0231d1f (patch)
tree3e60b11ad8e2839f5a7a91d210ef624704dcfabf /gcc
parent19c5b1cf0db62c006ae055b8f12a52eea73b82cf (diff)
downloadgcc-9a789d73d1e3ec0db2755ea8ed4ba3cfc0231d1f.zip
gcc-9a789d73d1e3ec0db2755ea8ed4ba3cfc0231d1f.tar.gz
gcc-9a789d73d1e3ec0db2755ea8ed4ba3cfc0231d1f.tar.bz2
varasm.c (globalize_decl): New fn.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/comdat3-aux.cc6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/comdat3.C13
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/comdat3.h8
3 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/comdat3-aux.cc b/gcc/testsuite/g++.old-deja/g++.other/comdat3-aux.cc
new file mode 100644
index 0000000..fc011e2
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/comdat3-aux.cc
@@ -0,0 +1,6 @@
+#include "comdat3.h"
+
+void f ()
+{
+ const bool *p = &A<int>::b;
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/comdat3.C b/gcc/testsuite/g++.old-deja/g++.other/comdat3.C
new file mode 100644
index 0000000..1ea047d0
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/comdat3.C
@@ -0,0 +1,13 @@
+// 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 ();
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/comdat3.h b/gcc/testsuite/g++.old-deja/g++.other/comdat3.h
new file mode 100644
index 0000000..e2ec970
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/comdat3.h
@@ -0,0 +1,8 @@
+template <class T> struct A {
+ static const bool b = false;
+};
+
+template <class T>
+const bool A<T>::b;
+
+void f ();