2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr65003.C
blob333cdbcc477da64004c3a9cfead4788e0f0e4d0a
1 // PR middle-end/65003
2 // { dg-do compile }
3 // { dg-options "-O2" }
4 // { dg-additional-options "-fpic" { target fpic } }
6 struct A
8   void operator= (A &);
9   A ();
11 struct B
13   A b;
15 struct C
17   virtual bool foo (int &, bool) const;
19 struct D : virtual C
21   bool foo (int &, bool) const;
22   B e;
24 struct F : D
26   F (int &, const int &, const A &);
27   bool foo (int &, bool) const;
29 bool D::foo (int &, bool) const { return true; }
30 F::F (int &, const int &, const A &) {}
31 bool F::foo (int &, bool) const { return false; }