[NFC][PR rtl-optimization/115877] Avoid setting irrelevant bit groups as live in...
[official-gcc.git] / gcc / testsuite / g++.dg / inherit / thunk10.C
blob702067749fa28731034c88a222fb4c2b81c8398e
1 /* { dg-options "-mthumb" { target arm*-*-* } } */
2 /* { dg-do run } */
3 /* { dg-timeout 100 } */
5 /* PR middle-end/39378 */
6 /* Check if the thunk target function is emitted correctly. */
7 class B1
9 public:
10   virtual int foo1(void);
11   int b1;
14 class B2
16 public:
17   virtual int foo2 (void);
18   int b2;
21 class D : public B1, public B2
23   int foo1(void);
24   int foo2(void);
25   int d;
28 int B1::foo1(void)
30   return 3;
33 int B2::foo2(void)
35   return 4;
38 int D::foo1(void)
40   return 1;
43 int D::foo2(void)
45   return 2;
48 __attribute__((noinline)) int test(B2* bp)
50   return bp->foo2();
53 int main()
55   B2 *bp = new D();
56   if (test(bp) == 2)
57     return 0;
58   else
59     return 1;