2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / inherit / covariant11.C
blobf82c4187984425a51caf5978528ca6f4229f7f6d
1 // { dg-do compile }
3 // Contributed by Nathan Sidwell 23 Oct 2003 <nathan@codesourcery.com>
4 // Origin: grigory@stl.sarov.ru
5 // PR c++/12700 ICE with covariancy
7 struct c2 { int i; };
9 struct c1 {
10   virtual c2& f8() {};
13 struct c3 : c1, c2 {
14   virtual c2& f8() {};
17 struct c11 : public c1 {
18   virtual c3& f8() {};
21 struct c15 : virtual c3 {
22   virtual c2& f8() {};
25 struct c18 : virtual c11 {
26   virtual c15& f8();
29 c15& c18::f8() { throw 0; }