[LLVMbugs] [Bug 19066] New: 0-sized vftable in the presence of virtual inheritance

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 6 05:27:17 PST 2014


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

            Bug ID: 19066
           Summary: 0-sized vftable in the presence of virtual inheritance
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: timurrrr at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

[from PR18967]

struct A { virtual void f() {} };
struct B : virtual A {};
struct C : virtual B, A {};
C c;

This test case is from PR17748.

We generate an empty vftable for the non-virtual A in C:
VFTable for 'A' in 'B' in 'C' (1 entries).
   0 | void A::f()
VFTable for 'A' in 'C' (0 entries).

Which gives this IR:
@"\01??_7C@@6BA@@@" = linkonce_odr unnamed_addr constant [0 x i8*]
zeroinitializer
@"\01??_7C@@6BB@@@" = linkonce_odr unnamed_addr constant [1 x i8*] [i8* bitcast
(void (%struct.A*)* @"\01?f at A@@UAEXXZ" to i8*)]

Which crashes the COFF writer as reported in PR18993.

-- 
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/20140306/cee2ece1/attachment.html>


More information about the llvm-bugs mailing list