[LLVMbugs] [Bug 18617] New: MS ABI: Offset of pointer to member is wrong
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jan 25 18:59:45 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18617
Bug ID: 18617
Summary: MS ABI: Offset of pointer to member is wrong
Product: clang
Version: unspecified
Hardware: PC
OS: All
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
extern "C" int printf(const char *, ...);
static char buffer[419430400];
inline void *operator new(size_t, void *pv) { return pv; }
struct __virtual_inheritance Virtual;
struct A {
int Virtual::*Field;
A() { printf("Field: %d\n", (int)((char *)&Field - buffer)); }
};
struct B : virtual A {};
int main() { new (buffer) B; }
we get:
Field: 4
msvc gets:
Field: 8
--
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/20140126/25869783/attachment.html>
More information about the llvm-bugs
mailing list