summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/explicit65.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/explicit65.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit65.C34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit65.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit65.C
new file mode 100644
index 000000000..20cda6384
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit65.C
@@ -0,0 +1,34 @@
+// { dg-do run }
+extern "C" void abort ();
+
+template <class T> void f ()
+{
+ abort ();
+}
+
+template <> void f<char> ()
+{
+ abort ();
+}
+
+template <class T> void f (int)
+{
+ abort ();
+}
+
+template <> void f<char> (int)
+{
+}
+
+template <class T> class C
+{
+ friend void f<char> (int);
+ public:
+ void ff () { f<char> (0); }
+};
+
+int main ()
+{
+ C<int> c;
+ c.ff();
+}