diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/other/ptrmem6.C')
-rw-r--r-- | gcc/testsuite/g++.dg/other/ptrmem6.C | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/ptrmem6.C b/gcc/testsuite/g++.dg/other/ptrmem6.C new file mode 100644 index 000000000..5fe796e1c --- /dev/null +++ b/gcc/testsuite/g++.dg/other/ptrmem6.C @@ -0,0 +1,10 @@ +// PR c++/19666 +// Origin: Volker Reichelt <reichelt@gcc.gnu.org> +// { dg-do compile } + +struct A { int i; }; + +int foo (A *p) +{ + return &p->i - &(p->*&A::i); +} |