1 // { dg-do assemble }
2
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 14 Nov 2000 <nathan@codesourcery.com>
5
6 // We rejected using decls bringing in functions from a base which would hide a
7 // nested class of the same name, but only if we had no functions by that name
8 // already. Also, we failed to find that using declaration during lookup. Also
9 // we failed to reject using declarations which matched the constructor name.
10
11 struct A
12 {
13 int f ();
14 void D ();
15 };
16
17 struct A2 {
18 typedef int f;
19 };
20
21 struct B : A
22 {
23 using A::f;
24 struct f {};
25 };
26
27 struct C : A
28 {
29 using A::f;
30 int f (int);
31 struct f {};
32 };
33
foo(B * bp,C * cp)34 void foo (B *bp, C* cp)
35 {
36 bp->f ();
37 cp->f ();
38 }
39
40 struct D : A
41 {
42 using A::D; // { dg-error "" } names constructor
43 };
44