summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/copy1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/copy1.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/copy1.C30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/copy1.C b/gcc/testsuite/g++.old-deja/g++.pt/copy1.C
new file mode 100644
index 000000000..24aa5e035
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/copy1.C
@@ -0,0 +1,30 @@
+// { dg-do run }
+int i = 0;
+
+template <class T>
+class F
+{
+public:
+ F() {}
+
+ template <class T2> F(F<T2>)
+ {
+ i = 1;
+ }
+};
+
+
+F<int>
+foo()
+{
+ F<int> f1;
+ F<int> f2(f1);
+ return f1;
+}
+
+int
+main()
+{
+ return i;
+}
+