Following up with a simple test case. If the patch looks OK, I'll work
this into a dejagnu test and add it to the patch.

class A
{
 public:
  A();
  virtual ~A();
 private:
  int i;
};

class B
{
 public:
  B();
  virtual ~B();
 private:
  int i;
};

class C : public A, public B
{
 public:
  C();
  virtual ~C();
};

C::C()
{
}

C::~C()
{
}

Compiled with -g -ffunction-sections, we should see something like
this for the thunks:

        .section        .text._ZThn16_N1CD1Ev,"ax",@progbits
        .globl  _ZThn16_N1CD1Ev
        .type   _ZThn16_N1CD1Ev, @function
_ZThn16_N1CD1Ev:
.LFB7:
        .cfi_startproc
        subq    $16, %rdi
        jmp     .LTHUNK0
        .cfi_endproc

and

        .section        .text._ZThn16_N1CD0Ev,"ax",@progbits
        .globl  _ZThn16_N1CD0Ev
        .type   _ZThn16_N1CD0Ev, @function
_ZThn16_N1CD0Ev:
.LFB8:
        .cfi_startproc
        subq    $16, %rdi
        jmp     .LTHUNK1
        .cfi_endproc

Reply via email to