summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/comdat2-aux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/comdat2-aux.cc')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/comdat2-aux.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/comdat2-aux.cc b/gcc/testsuite/g++.old-deja/g++.other/comdat2-aux.cc
new file mode 100644
index 000000000..283e4e092
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/comdat2-aux.cc
@@ -0,0 +1,17 @@
+template <class T>
+struct S {
+ static int f ()
+ {
+ static int i;
+ return ++i;
+ }
+ S () {};
+ ~S () {};
+};
+
+typedef S<int> a;
+
+int g ()
+{
+ return a::f();
+}