summaryrefslogtreecommitdiff
path: root/gcc_arm/testsuite/g++.old-deja/g++.pt/t39.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.pt/t39.C')
-rwxr-xr-xgcc_arm/testsuite/g++.old-deja/g++.pt/t39.C25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/t39.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/t39.C
new file mode 100755
index 0000000..d12ef81
--- /dev/null
+++ b/gcc_arm/testsuite/g++.old-deja/g++.pt/t39.C
@@ -0,0 +1,25 @@
+extern "C" int printf (const char *, ...);
+
+template <class T>
+struct frob {
+ T *ptr;
+ void print ();
+ frob (T* init) { ptr = init; }
+};
+
+template <class T>
+void frob<T>::print () {
+ printf ("this = %08x\n", this);
+ printf (" ptr = %08x\n", ptr);
+ printf (" values = %x %x %x ...\n", ptr[0], ptr[1], ptr[2]);
+}
+
+ static int x[10];
+ frob<char> fc ("hello");
+ frob<int> fi (x);
+
+int main () {
+ fc.print ();
+ fi.print ();
+ return 0;
+}