[LLVMbugs] [Bug 19397] New: MS ABI: Extra vtordisp thunk generated method inherited from virtual base

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 10 17:49:45 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19397

            Bug ID: 19397
           Summary: MS ABI: Extra vtordisp thunk generated method
                    inherited from virtual base
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rnk at google.com
                CC: llvmbugs at cs.uiuc.edu, timurrrr at google.com
    Classification: Unclassified

In this example, we generate a thunk for g and MSVC doesn't.  This may not be a
correctness problem, but it shows up when comparing vftables.

$ cat t.cpp
struct A {
  A() {}
  virtual void f() = 0;
  virtual void g();
};
struct B : A { 
  B() {}
  virtual void g();
};
struct C : virtual B {
  C() {}
  virtual void f();
};
C c;

$ dumpbin /symbols t1.obj  | grep ?g@
025 00000000 SECT6  notype ()    External     | ?g at B@@$4PPPPPPPM at A@AEXXZ
([thunk]:public: virtual void __thiscall B::g`vtordisp{4294967292,0}' (void))
026 00000000 UNDEF  notype       External     | ?g at B@@UAEXXZ (public: virtual
void __thiscall B::g(void))
02A 00000000 UNDEF  notype       External     | ?g at A@@UAEXXZ (public: virtual
void __thiscall A::g(void))

$ dumpbin /symbols t2.obj  | grep ?g@
012 00000000 UNDEF  notype ()    External     | ?g at A@@UAEXXZ (public: virtual
void __thiscall A::g(void))
014 00000000 UNDEF  notype ()    External     | ?g at B@@UAEXXZ (public: virtual
void __thiscall B::g(void))

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140411/8f89e139/attachment.html>


More information about the llvm-bugs mailing list