summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.old-deja/g++.other/ptrmem5.C
blob: 7c38857e67c06b0a977bbc0ef873953152c3e6d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Bug: g++ doesn't see that A is a vbase of C.
// Submitted by Jason Merrill <jason@cygnus.com>
// Build don't link:

struct A {
  int i;
  void f ();
};

struct B: public A { };
struct C: public virtual B { };

void g ()
{
  int C::*p = &A::i;		// ERROR - conversion from vbase
  void (C::*fp)() = &A::f;	// ERROR - conversion from vbase
}
OpenPOWER on IntegriCloud