aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/p6311.C
blob: a0ef8c8c1fd11f8993923712a6d524e0cd2efa12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// prms-id: 6311

struct Foo {
  int member;
} a = { 42 }, *ptra = &a;

int Foo::*pmd = &Foo::member;

int main() {
  if (pmd == 0)
    return 1;
  if (a.*pmd != 42)
    return 2;
  if (ptra->*pmd != 42)
    return 3;
}