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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
            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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to