aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/lookup/using36.C
blob: 966c60b896147b8981203c8c2bec92989476ca4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// PR c++/25994
// { dg-do run }

struct B1
{
  void f (char) {}
  void f (double) { __builtin_abort(); }
};

struct B2
{
  void f (double) { __builtin_abort(); }
  void f (int) {}
};

struct D : public B1, public B2
{
  using B1::f;
  using B2::f;
  void g ()
  {
    f ('a');           // should call B1::f(char)
    f (33);            // should call B2::f(int)
  }
};

int main()
{
  D d;
  d.g();
}