[LLVMbugs] [Bug 20444] New: VFTable larger than needed for multiple inheritance hierarchy

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jul 24 16:06:49 PDT 2014


            Bug ID: 20444
           Summary: VFTable larger than needed for multiple inheritance
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david.majnemer at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

struct A {
  virtual A *f() { return 0; }
struct B {
  virtual B *f() { return 0; }
struct C : A, B {
  virtual C *f() { return 0; }
A a;
B b;
C c;
B *get_c() { return &c; }
int main() {

We generate the following:
        .long   "?f at C@@UAEPAU1 at XZ"
        .long   "?f at C@@UAEPAU1 at XZ"

Note that the VFTable has the same entry twice in it.  This can be very
problematic if we have RTTI because the largest VFTable might not get picked.

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/20140724/37790540/attachment.html>

More information about the llvm-bugs mailing list