Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / g++.dg / warn / pr11159.C
blobed4107a230ba02f1a986e48e59c8ef6dcd4fa188
1 // PR c++/11159 : erroneous warning in copy ctor with virtual inheritance
2 // { dg-do compile }
3 // { dg-options "-Wall -Wextra" }
4 struct A
6   A ();
7 };
9 struct B : virtual A
11   B ();
14 struct C : virtual A
16   C ();
19 struct D : B, C
21   D (D const&){}
24 template <typename Base>
25 struct E : Base
27   E ();
29   E (E const &)
30     : Base ()
31   {
32   };
35 E<C> foo;
36 E<C> bar (foo);