111
|
1 // PR middle-end/65003
|
|
2 // { dg-do compile }
|
|
3 // { dg-options "-O2" }
|
|
4 // { dg-additional-options "-fpic" { target fpic } }
|
|
5
|
|
6 struct A
|
|
7 {
|
|
8 void operator= (A &);
|
|
9 A ();
|
|
10 };
|
|
11 struct B
|
|
12 {
|
|
13 A b;
|
|
14 };
|
|
15 struct C
|
|
16 {
|
|
17 virtual bool foo (int &, bool) const;
|
|
18 };
|
|
19 struct D : virtual C
|
|
20 {
|
|
21 bool foo (int &, bool) const;
|
|
22 B e;
|
|
23 };
|
|
24 struct F : D
|
|
25 {
|
|
26 F (int &, const int &, const A &);
|
|
27 bool foo (int &, bool) const;
|
|
28 };
|
131
|
29 bool D::foo (int &, bool) const { return true; }
|
111
|
30 F::F (int &, const int &, const A &) {}
|
131
|
31 bool F::foo (int &, bool) const { return false; }
|