http://llvm.org/bugs/show_bug.cgi?id=6766
Summary: clang crash with a complex C99 structure
initialisation
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
It is a reduction from gcc torture test "c99-init-1.c"
$cat b.c
typedef __WCHAR_TYPE__ wchar_t;
struct K {
wchar_t L[6];
int M;
} l = { { L"foo" }, 1 };
$ clang -cc1 b.c -emit-llvm
clang: llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp:51:
bool<unnamed>::ConstStructBuilder::AppendField(const clang::FieldDecl*,
uint64_t, const clang::Expr*): Assertion `NextFieldOffsetInBytes <=
FieldOffsetInBytes && "Field offset mismatch!"' failed.
0 clang 0x08f6b498
Stack dump:
0. Program arguments: clang -cc1 b.c -emit-llvm
1. <eof> parser at end of file
2. b.c:3:8: LLVM IR generation of declaration 'K'
3. b.c:6:3: Generating code for declaration 'l'
Aborted
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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