diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/ptrmem1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/ptrmem1.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem1.C b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem1.C new file mode 100644 index 000000000..8ebc61c51 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem1.C @@ -0,0 +1,19 @@ +// { dg-do run } +class foo +{ +public: + template<class T> + T bar() { return 7; } +}; + +int +main() +{ + foo f; + + int (foo::*s)() = &foo::bar<int>; + if ((f.*s)() == 7) + return 0; + else + return 1; +} |