blob: 71124a2f08ddcfef74c6b8be932b3cb48319ae90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// { dg-do assemble }
// Test that referring to an ambiguous base in name lookup prevents
// access to the field, even though the field is not ambiguous.
struct A {
int i;
};
struct B: virtual A { };
struct C: public B { };
struct D: public B { };
struct E: public C, public D {
void f ();
};
void E::f() {
B::i = 0; // { dg-error "" } B is ambiguous
}
void f () {
E e;
e.B::i = 0; // { dg-error "" } B is ambiguous
}
|