aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/ptrmem11.C
blob: 7100a2d034b01cf18df3218addae88c1429b7297 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/113599
// { dg-do run }

struct A { void *a; };
struct B { void *b; };
struct C : public B, public A { A c; };
static C d;

int
main ()
{
  A C::*e = &C::c;
  A *f = &(d.*e);
  A *g = &d.c;
  if (f != g)
    __builtin_abort ();
}