xref: /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/g++.dg/lookup/using.C (revision c87b03e512fc05ed6e0222f6fb0ae86264b1d05b)
1 // { dg-do compile }
2 
3 struct X { };
4 struct Y { };
5 struct Z { };
6 
7 struct Base {
fBase8   X f() { return X(); }
fBase9   Y f() const { return Y(); }
10 };
11 
12 struct Derived : Base {
13   using Base::f;
fDerived14   Z f(int) { return Z(); }
15 };
16 
main()17 int main()
18 {
19   Derived d;
20   X x = d.f();                  // { dg-bogus "Y" "" }
21 }
22 
23 
24