Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.abi / primary4.C
blob3e36c58a3f5f88fb425e5313ff5266133ab38c98
1 // { dg-do run  }
2 // Copyright (C) 2000 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>
5 // Check primary bases are chosen correctly.
7 struct A { virtual void Foo () {}};
9 struct B1 : virtual A {};
10 struct B2 : virtual A {};
12 struct C : virtual B1 {};
14 struct D : virtual B1, B2, C {};
16 int main ()
18   D d;
19   A *ap = &d;
20   C *cp = &d;
21   
22 #if __GXX_ABI_VERSION >= 100
23   if (static_cast <void *> (ap) != static_cast <void *> (cp))
24     return 1;
25 #endif
27   return 0;