summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/overload5.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/overload5.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/overload5.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload5.C b/gcc/testsuite/g++.old-deja/g++.other/overload5.C
new file mode 100644
index 000000000..929876737
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/overload5.C
@@ -0,0 +1,22 @@
+// { dg-do link }
+
+struct S {};
+
+struct T : public S {};
+
+struct U : public T {};
+
+void f(int T::*) {}
+void f(int U::*);
+
+void g(void (T::*)(int)) {}
+void g(void (U::*)(int));
+
+int main()
+{
+ int S::*ip;
+ void (S::*fp)(int);
+
+ f(ip);
+ g(fp);
+}