summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/template24.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.brendan/template24.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/template24.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/template24.C b/gcc/testsuite/g++.old-deja/g++.brendan/template24.C
new file mode 100644
index 000000000..d7559547f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/template24.C
@@ -0,0 +1,21 @@
+// { dg-do run }
+// GROUPS passed templates
+extern "C" int printf (const char *, ...);
+
+template <class F>
+class Temp
+{
+ F func_;
+public:
+ Temp (F f) :func_(f) {}
+};
+
+int func (int h = 1, int z = 2) { return h+z; }
+
+int main ()
+{
+ Temp<int(*)(int, int)> temp (func);
+
+ printf ("PASS\n");
+ return 0;
+}