diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/warn/pr11159.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/warn/pr11159.C | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/warn/pr11159.C b/gcc-4.9/gcc/testsuite/g++.dg/warn/pr11159.C new file mode 100644 index 000000000..ed4107a23 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/warn/pr11159.C @@ -0,0 +1,37 @@ +// PR c++/11159 : erroneous warning in copy ctor with virtual inheritance +// { dg-do compile } +// { dg-options "-Wall -Wextra" } +struct A +{ + A (); +}; + +struct B : virtual A +{ + B (); +}; + +struct C : virtual A +{ + C (); +}; + +struct D : B, C +{ + D (D const&){} +}; + +template <typename Base> +struct E : Base +{ + E (); + + E (E const &) + : Base () + { + }; +}; + +E<C> foo; +E<C> bar (foo); + |