summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/inherit/thunk4.C
blob: a6e913e59e3454b5993c33501b30f6e3e2aa6451 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// PR c++/21123

struct A
{
  A( const A &a);
  const A& operator=( const A& a);
};

struct B
{
  virtual A f();
};

struct C : virtual B
{
  virtual A f();
  A a;
};

A C::f() 
{
  return a;
}