1// { dg-do run }
2
3// Copyright (C) 2003 Free Software Foundation, Inc.
4// Contributed by Nathan Sidwell 14 Mar 2003 <nathan@codesourcery.com>
5
6// PR 9629. The vtable is not set up until the base initializers have
7// run.
8
9struct A {
10  static A *a;
11  A ();
12};
13A *A::a;
14A::A () {a = this;}
15
16struct B {
17  static A *a;
18  B (A *);
19};
20A *B::a;
21B::B(A *a_) {a = a_;}
22
23struct C : virtual public A, public B {
24  C();
25};
26C::C () : B(this) {}
27
28struct D : virtual public C {};
29
30int main()
31{
32  new D();
33  return A::a != B::a;
34}
35