summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C
blob: 6df10a99fe2320bd0f0449ec3dd226f195432b9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do run  }
// Test to make sure g++ can handle target types that aren't identical
// with pointers to members.

struct A { int i; };
struct B : public A { };

int main ()
{
  int A::*p = &A::i;
  const int B::*q = &A::i;
  return p != q;
}