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')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.pt/copy1.C29
1 files changed, 29 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 100755
index 0000000..7981530
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/copy1.C
@@ -0,0 +1,29 @@
+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;
+}
+