aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1998-10-19 16:13:26 -0400
committerJason Merrill <jason@gcc.gnu.org>1998-10-19 16:13:26 -0400
commitea4d3ff6e081929a77d3306137d175505106de58 (patch)
treed43985d6f4b08dd92258bc4cf710dec24f68a4d0
parent1590ea76e9da81740d9db7a75478e525e1a3c7f0 (diff)
downloadgcc-ea4d3ff6e081929a77d3306137d175505106de58.zip
gcc-ea4d3ff6e081929a77d3306137d175505106de58.tar.gz
gcc-ea4d3ff6e081929a77d3306137d175505106de58.tar.bz2
new
From-SVN: r23188
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/lookup4.C21
1 files changed, 21 insertions, 0 deletions
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
index 0000000..59b7a75
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/lookup4.C
@@ -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);
+}