summaryrefslogtreecommitdiff
path: root/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp28.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp28.C')
-rwxr-xr-xgcc_arm/testsuite/g++.old-deja/g++.pt/memtemp28.C27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp28.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp28.C
new file mode 100755
index 0000000..37e79c8
--- /dev/null
+++ b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp28.C
@@ -0,0 +1,27 @@
+extern "C" void abort();
+
+int k;
+
+template <class X>
+struct S
+{
+ template <class U>
+ void f(U u)
+ { ++k; g(u); }
+
+ template <class U>
+ void g(U u)
+ { ++k; }
+
+ int c[16];
+};
+
+int main()
+{
+ S<char*> s;
+ s.f(3);
+ s.f("adf");
+
+ if (k != 4)
+ abort();
+}