OSDN Git Service

Fix PR debug/49047
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / inherit / base1.C
1 // { dg-do compile }
2 // { dg-options "-pedantic-errors -w" }
3
4 // Copyright (C) 2000 Free Software Foundation, Inc.
5 // Contributed by Nathan Sidwell 29 Nov 2001 <nathan@nathan@codesourcery.com>
6
7 // PR 164
8 // Although a direct base can be inaccessible due to ambiguity, that
9 // should not blow up synthesized methods.
10
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;};
15
16 void foo2 ()
17 {
18   D d;
19   D e (d);
20
21   e = d;
22 }