ieee_4.f90: xfail on i?86-*-freebsd*
[official-gcc.git] / libvtv / testsuite / libvtv.cc / thunk.cc
blobbec1057f564b904a7d3825837debe45adb509400
1 // { dg-do run }
3 #include <assert.h>
4 struct A {
5 A():value(123) {}
6 int value;
7 virtual int access() { return this->value; }
8 };
9 struct B {
10 B():value(456) {}
11 int value;
12 virtual int access() { return this->value; }
14 struct C : public A, public B {
15 C():better_value(789) {}
16 int better_value;
17 virtual int access() { return this->better_value; }
19 struct D: public C {
20 D():other_value(987) {}
21 int other_value;
22 virtual int access() { return this->other_value; }
25 int use(B *b)
27 return b->access();
30 int main()
32 C c;
33 assert(use(&c) == 789);
34 D d;
35 assert(use(&d) == 987);
36 return 0;