[LLVMbugs] [Bug 19408] New: MS ABI: Bad this adjustment in vtable thunk with vtordisp

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Apr 11 15:52:31 PDT 2014


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

            Bug ID: 19408
           Summary: MS ABI: Bad this adjustment in vtable thunk with
                    vtordisp
           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: david.majnemer at gmail.com, llvmbugs at cs.uiuc.edu,
                    timurrrr at google.com
            Blocks: 12477, 18887
    Classification: Unclassified

This program should print 3 but it prints 4:

extern "C" int printf(const char *, ...);

struct A { 
  A() : a(1) {}
  virtual void f() { printf("%d\n", a); }
  int a;
};
struct B : virtual A {
  B() : b(2) {}
  int b;
};
struct C : B {
  C() : c(3) {}
  virtual void f() { printf("%d\n", c); }
  int c;
};
struct D : C {
  D() : d(4) {}
  int d;
};

int main() {
  D x;
  x.f();
}

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


More information about the llvm-bugs mailing list