summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/explicit17.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/explicit17.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit17.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit17.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit17.C
new file mode 100644
index 000000000..9a83fb0c4
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit17.C
@@ -0,0 +1,23 @@
+// { dg-do assemble }
+// { dg-options "-ansi -pedantic-errors -w" }
+// GROUPS passed templates
+template <class T, class U>
+void foo(U u, T t);
+
+template <class T>
+void foo(T t);
+
+template <class T>
+struct S {};
+
+template <class T>
+void foo(const S<T>&);
+
+void bar()
+{
+ void (*fn)(double, int) =
+ (void (*)(double, int)) &foo<int>;
+ void (*fn2)(double) = foo<double>;
+ foo<int>(3, 3.0);
+ foo<int>(S<int>());
+}