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

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

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

void g ()
{
  int C::*p = &A::i;		// { dg-error "" } conversion from vbase
  void (C::*fp)() = &A::f;	// { dg-error "" } conversion from vbase
}