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