diff options
author | Jason Merrill <jason@gcc.gnu.org> | 1998-10-19 16:13:26 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-10-19 16:13:26 -0400 |
commit | ea4d3ff6e081929a77d3306137d175505106de58 (patch) | |
tree | d43985d6f4b08dd92258bc4cf710dec24f68a4d0 | |
parent | 1590ea76e9da81740d9db7a75478e525e1a3c7f0 (diff) | |
download | gcc-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.C | 21 |
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); +} |