* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / abi / dcast1.C
blob99f678ff3a9a019914f99f497b8620ac35e02f48
1 // { dg-do compile }
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 28 Jan 2003 <nathan@codesourcery.com>
6 // PR 9433. segfault at runtime.
8 struct A        { virtual void f() {} };
9 struct B        {int b;};
10 struct C : A, B { virtual void f() {} int c;};
11 struct D : C    {int d;};
12 struct E : C    {int e;};
13 struct F : protected D, E  {int f;};
14 struct H : virtual F {int h;};
15 struct I : H  {int i;};
16 struct J : H  {int j;};
17 struct K : I, J { virtual void f() {} int k; };
18 struct M : K  {int m;};
19 struct N : M  {int n;};
20 struct O : M  {int o;};
21 struct P : N, O { virtual void f() {} int p;};
23 int main()
25   P obj;
26   A* a1 = (D *) (&obj);
27   H* hp = dynamic_cast<H*>(a1);
28   return hp != 0;