[LLVMbugs] [Bug 18458] New: MS ABI: Assertion when laying out array of zero sized objects
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jan 13 10:38:01 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18458
Bug ID: 18458
Summary: MS ABI: Assertion when laying out array of zero sized
objects
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: rnk at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Consider:
struct A {};
struct SmallVector {
A InlineElts[3];
};
SmallVector D;
Gives the assertion:
Assertion failed: NextFieldOffset <= RecordSize && "Size mismatch!", file
..\tools\clang\lib\CodeGen\CGRecordLayoutBuilder.cpp, line 899
Clang thinks that the A array occupies no space, but MSVC thinks each element
is one byte, giving a sizeof of 3.
*** Dumping AST Record Layout
0 | struct SmallVector
0 | struct A [3] InlineElts
| [sizeof=1, align=1
| nvsize=1, nvalign=1]
--
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/20140113/f6a796fe/attachment.html>
More information about the llvm-bugs
mailing list