4 /* { dg-options "-O0" } */
6 #define DEFINE_VIRTUALS_FNS(i) virtual void xxx##i () {} \
7 virtual void foo1_##i () {}\
8 virtual void foo2_##i () {}\
9 virtual void foo3_##i () {}\
10 virtual void foo4_##i () {}\
11 virtual void foo5_##i () {}\
12 virtual void foo6_##i () {}\
13 virtual void foo7_##i () {}\
14 virtual void foo8_##i () {}\
15 virtual void foo9_##i () {}\
16 virtual void foo10_##i () {}\
17 virtual void foo11_##i () {}\
18 virtual void foo12_##i () {}\
19 virtual void foo13_##i () {}\
20 virtual void foo14_##i () {}\
21 virtual void foo15_##i () {}\
22 virtual void foo16_##i () {}\
23 virtual void foo17_##i () {}\
24 virtual void foo18_##i () {}\
25 virtual void foo19_##i () {}\
26 virtual void foo20_##i () {}\
27 virtual void foo21_##i () {}\
28 virtual void foo22_##i () {}\
34 /* Define lots of virtual functions */
35 DEFINE_VIRTUALS_FNS (1)
36 DEFINE_VIRTUALS_FNS (2)
37 DEFINE_VIRTUALS_FNS (3)
38 DEFINE_VIRTUALS_FNS (4)
39 DEFINE_VIRTUALS_FNS (5)
40 DEFINE_VIRTUALS_FNS (6)
41 DEFINE_VIRTUALS_FNS (7)
42 DEFINE_VIRTUALS_FNS (8)
43 DEFINE_VIRTUALS_FNS (9)
44 DEFINE_VIRTUALS_FNS (10)
45 DEFINE_VIRTUALS_FNS (11)
46 DEFINE_VIRTUALS_FNS (12)
47 DEFINE_VIRTUALS_FNS (13)
48 DEFINE_VIRTUALS_FNS (14)
49 DEFINE_VIRTUALS_FNS (15)
50 DEFINE_VIRTUALS_FNS (16)
51 DEFINE_VIRTUALS_FNS (17)
52 DEFINE_VIRTUALS_FNS (18)
53 DEFINE_VIRTUALS_FNS (19)
54 DEFINE_VIRTUALS_FNS (20)
57 virtual ~base_class_2 ();
60 base_class_2::base_class_2()
64 base_class_2::~base_class_2 ()
71 virtual ~base_class_1();
75 base_class_1::base_class_1()
79 base_class_1::~base_class_1()
83 class base_Impl_class :
84 virtual public base_class_2, public base_class_1
88 virtual ~base_Impl_class ();
91 base_Impl_class::base_Impl_class ()
95 base_Impl_class::~base_Impl_class ()
100 class test_cls : public base_Impl_class
111 test_cls::~test_cls()
117 test_cls *test = new test_cls;
118 base_class_2 *p1 = test;
120 /* PR59695 destructor thunk offsets are not setup
121 correctly resulting in crash. */