2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.abi / primary2.C
blobfd440c0b048392e9ffa8314df822ff8bdc70adde
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 () {}};
8 struct B : virtual A {};
9 struct C : virtual B {};
10 struct D : virtual B, virtual C {};
12 int main ()
14   D d;
16 #if __GXX_ABI_VERSION >= 100
17   if (sizeof (D) != sizeof (A))
18     return 1;
19 #endif
21   return 0;