2 // Test rtti hint flags
3 // Copyright (C) 2000, 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 3 Apr 2000 <nathan@nathan@codesourcery.com>
8 #if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
12 struct A1vA : virtual A {int m;};
13 struct A2vA : virtual A {int m;};
14 struct A1A : A {int m;};
15 struct A2A : A {int m;};
18 struct C1 : B, virtual A {int m;};
20 struct D1 : A1vA, A2vA {int m;};
22 struct E1 : A1A, A2A {int m;};
24 struct E2 : A1A, A2vA {int m;};
26 struct F1 : A1A, A1vA, A2vA {int m;};
28 struct P1 : protected A {int m;};
30 struct P2 : B, P1 {int m;};
34 int expect (int flags, std::type_info const &info)
36 abi::__vmi_class_type_info const *ptr =
37 dynamic_cast <abi::__vmi_class_type_info const *> (&info);
40 if (ptr->__flags != flags)
47 if (! expect (0, typeid (C1)))
49 if (! expect (2, typeid (D1)))
51 if (! expect (1, typeid (E1)))
53 if (! expect (1, typeid (E2)))
55 if (! expect (3, typeid (F1)))
58 if (!expect (0, typeid (P1)))
60 if (!expect (0, typeid (P2)))