http://llvm.org/bugs/show_bug.cgi?id=3396
Summary: Crash in Sema with non-constant offsetof
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Testcase:
struct sockaddr_un {
unsigned char sun_len;
char sun_path[104];
};
int a() {
int a[__builtin_offsetof(struct sockaddr_un, sun_path[len+1])];
}
Crashes with the following message:
clang:
/home/eli/llvm/tools/clang/lib/CodeGen/../../include/clang/AST/Expr.h:169:
llvm::APSInt clang::Expr::getIntegerConstantExprValue(clang::ASTContext&)
const: Assertion `success && "Illegal argument to getIntegerConstantExpr"'
failed.
Note that non-constant offsetof is a gcc extension.
--
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