https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98744

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
If the testcase is compiled with -O0, then it looks clearly like a wrong-code:
  B::B (_1);
is the call in C::C, while the ctor it is calling is:
void B::B (struct B * const this, const void * * __vtt_parm)
{
  const void * _1;

  <bb 2> :
  _1 = *__vtt_parm_3(D);
  this_4(D)->_vptr.B = _1;
  return;

}
        pushq   %rbp
        movq    %rsp, %rbp
        movq    %rdi, -8(%rbp)
        movq    %rsi, -16(%rbp)
        movq    -16(%rbp), %rax
        movq    (%rax), %rdx
        movq    -8(%rbp), %rax
        movq    %rdx, (%rax)
        nop
        popq    %rbp
and actually uses the second argument which is not passed.

Reply via email to