2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / inherit / base1.C
blob952c6d20f3b0c28869f22b9a6c36b48f4f460dd2
1 // { dg-do compile }
2 // { dg-options "-pedantic-errors -w" }
4 // Copyright (C) 2000 Free Software Foundation, Inc.
5 // Contributed by Nathan Sidwell 29 Nov 2001 <nathan@nathan@codesourcery.com>
7 // PR 164
8 // Although a direct base can be inaccessible due to ambiguity, that
9 // should not blow up synthesized methods.
11 struct A {int m;};
12 struct B : A {int m;};
13 struct C : virtual A, B {int m;};
14 struct D : B, C {int m;};
16 void foo2 ()
18   D d;
19   D e (d);
21   e = d;