new
authorJason Merrill <jason@gcc.gnu.org>
Mon, 19 Oct 1998 20:13:26 +0000 (16:13 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 19 Oct 1998 20:13:26 +0000 (16:13 -0400)
From-SVN: r23188

gcc/testsuite/g++.old-deja/g++.other/lookup4.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup4.C b/gcc/testsuite/g++.old-deja/g++.other/lookup4.C
new file mode 100644 (file)
index 0000000..59b7a75
--- /dev/null
@@ -0,0 +1,21 @@
+// Test for proper handling of references to overloaded member functions.
+
+struct A {
+  static void f (int) { }
+  void f ();
+};
+
+void (*p)(int) = &A::f;
+
+void A::f ()
+{
+  p = f;
+}
+
+int main()
+{
+  A a;
+  p = &a.f;
+  (a.f)();
+  (a.f)(42);
+}