aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.other/overload6.C
blob: fda22838bff4edbd589335ae7aeb59658e57729a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do run  }
extern "C" void abort();

struct S1
{
  int f() { return 0; }
  int f() const { return 1; }
};

struct S2 : public S1
{
};

int main()
{
  S2 s2;
  if (s2.f() != 0)
    abort ();
}