aboutsummaryrefslogtreecommitdiff
path: root/test/C++Frontend/pointer_member.cpp
blob: 46ad7c3a1fe8883f7d2d0da9587d9a244f1c3907 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>

struct B { int i, j; };
struct D : public B {};
int D::*di = &D::i;
int D::*dj = &D::j;

int main() {
  D d;
  d.i = d.j = 0;
  d.*di = 4;
  d.*dj = 7;

  printf("%d %d\n", d.i, d.j);

  return 0;
}