http://llvm.org/bugs/show_bug.cgi?id=19519
Timur Iskhodzhanov <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #1 from Timur Iskhodzhanov <[email protected]> --- CL from VS2013 seems to do the wrong thing: ---------------------- #include <assert.h> #include <stdio.h> struct A { virtual void f() {} virtual void g() {} }; struct B : virtual A { virtual void g() {} B(); }; B::B() {} struct C : virtual A { virtual void f(); int c; }; struct D : B, C { D(); }; void zoo(C *obj) { obj->f(); } void C::f() { assert(c == 42); } D::D() { c = 42; zoo(this); } struct E : D { // E appends a field at the end of D, thus the offset of A in C increases. int x; }; int main() { E e; printf("OK\n"); } ---------------------- -> this passes under clang-cl (and g++ on Linux) but fails the assertion when built with CL. See also PR19475. -- 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
