gcc/testsuite/g++.dg/ipa/pr60640-2.C
raw| 1 | // { dg-do compile } |
| 2 | // { dg-options "-O3" } |
| 3 | |
| 4 | struct B { virtual unsigned f () const; }; |
| 5 | struct C { virtual void f (); }; |
| 6 | struct F { virtual unsigned f (bool) const; ~F (); }; |
| 7 | struct J : C, F {}; |
| 8 | struct G : J { unsigned f (bool) const { return 0; } }; |
| 9 | struct H : B |
| 10 | { |
| 11 | H (int); |
| 12 | unsigned f () const { return ((const F &) h).f (0); } |
| 13 | G h; |
| 14 | }; |
| 15 | H h (0); |