summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/offset2.C
blob: 80e37ad0395aee96476409d7defe511af7ee46ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// { dg-do run  }
// PRMS Id: 5070 (testcase 2)

int status = 1;

struct foo {
  foo& operator= (const foo&) { status = 0; return *this; }
};

struct xx {
  foo a;
};

struct yy : public xx {
  yy(foo& a) { xx::a = a; }
};

int main()
{
  foo f;
  yy y (f);

  return status;
}