summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/dyncast9.C
blob: f2b9990197a38f82531bd90290e0454b805af64e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do run  }
class S1 { int i; };
class S2 { int i; };
class VB {
public:
  virtual void foo() { }
};

class D : public S1, virtual public VB {
} d;

class E : public S2, public D {
} e;

int main() {
  return (char *)&e - (char *)dynamic_cast<E*>((D*)&e);
}