[LLVMbugs] [Bug 18298] New: [-cxx-abi microsoft] Trivially adjustable covariant return types should not require a thunk

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Dec 20 17:04:13 PST 2013


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

            Bug ID: 18298
           Summary: [-cxx-abi microsoft] Trivially adjustable covariant
                    return types should not require a thunk
           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

Clang emits a no-op return adjusting thunk for this code, but more importantly,
it adds a slot to D's vtable, which is an ABI problem:

$ cat t.cpp
struct A { };
struct B : A {};
struct C { virtual A *f(); };
struct D : C { virtual B *f(); };
D d;

MSVC creates a single-entry vftable for D, while clang gives it two entries.

I realized this after committing r197836, which only scratched the surface of
the problem.  We need to actually calculate the adjustment and see if it is
empty.

-- 
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/20131221/10112e44/attachment.html>


More information about the llvm-bugs mailing list