1 // { dg-do assemble  }
2 // Copyright (C) 1999, 2000 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 29 Aug 1999 <nathan@acm.org>
4 
5 // We should spot all ambiguities
6 
7 struct A {int m;};
8 struct B : A { int m; };
9 struct C : A { int m; };
10 struct D0 : virtual B, virtual C { int m; };
11 struct D1 : virtual B, C { int m; };
12 struct D2 : B, virtual C { int m; };
13 struct D3 : B, C { int m; };
14 
fn(D0 * d0,D1 * d1,D2 * d2,D3 * d3)15 void fn(D0 *d0, D1 *d1, D2 *d2, D3 *d3)
16 {
17   A *a0 = d0;   // { dg-error "" } A is an ambiguous base
18   A *a1 = d1;   // { dg-error "" } A is an ambiguous base
19   A *a2 = d2;   // { dg-error "" } A is an ambiguous base
20   A *a3 = d3;   // { dg-error "" } A is an ambiguous base
21 }
22