summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/pr37862.C
blob: 89b4b69947517038c91aca15b382bcdc6763be06 (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
// { dg-do run }
#include <stdlib.h>

class A {
public:
  virtual void get (void) { }
};

class B : public A {
public:
  void get (void) { abort (); }
};

class C : public B { };

int main (void)
{
  C   c;
  C * p = &c;

  p->A::get ();	
  (p->A::get) ();	// The C++ parser used to resolve this to B::get()

  return 0;
}