// PR c++/52126 // { dg-do compile } template struct Z {}; template struct A { struct B; struct C; struct D; struct E; struct F; }; template struct A::B : A { using A::nonexist; // { dg-error "no members matching" } }; template struct A::C : A { using A::nonexist; // { dg-error "no members matching" } }; template struct A::D : A { using A::nonexist; // { dg-error "no members matching" } }; template struct A::E : A { using A::nonexist; // { dg-error "no members matching" } }; template struct A::F : Z { using Z::nonexist; };