diff options
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.other/lookup4.C')
-rwxr-xr-x | gcc_arm/testsuite/g++.old-deja/g++.other/lookup4.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.other/lookup4.C b/gcc_arm/testsuite/g++.old-deja/g++.other/lookup4.C new file mode 100755 index 0000000..59b7a75 --- /dev/null +++ b/gcc_arm/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); +} |