From: Jason Merrill Date: Mon, 19 Oct 1998 20:13:26 +0000 (-0400) Subject: new X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea4d3ff6e081929a77d3306137d175505106de58;p=gcc.git new From-SVN: r23188 --- 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 00000000000..59b7a75b2bd --- /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); +}