aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/pr65003.C
blob: 5d131afaedbdb5d68ed531888c5c8da06f6d7d8a (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
25
26
27
28
29
30
31
// PR middle-end/65003
// { dg-do compile }
// { dg-options "-O2" }
// { dg-additional-options "-fpic" { target fpic } }

struct A
{
  void operator= (A &);
  A ();
};
struct B
{
  A b;
};
struct C
{
  virtual bool foo (int &, bool) const;
};
struct D : virtual C
{
  bool foo (int &, bool) const;
  B e;
};
struct F : D
{
  F (int &, const int &, const A &);
  bool foo (int &, bool) const;
};
bool D::foo (int &, bool) const {}
F::F (int &, const int &, const A &) {}
bool F::foo (int &, bool) const {}