https://bugs.llvm.org/show_bug.cgi?id=35267
Bug ID: 35267
Summary: clang asserts when total size of static variables
exceeds the address space
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: ch3r...@openwall.com
CC: llvm-bugs@lists.llvm.org
Source code:
----------------------------------------------------------------------
int main(void)
{
static char a[-1u / 2];
static char b[-1u / 2];
static char c[3];
a[0] = 1;
b[0] = 1;
c[2] = 1;
}
----------------------------------------------------------------------
Results:
----------------------------------------------------------------------
$ clang -std=c11 -m32 test.c
clang-6.0:
/path/to/clang/sources/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:123:
virtual void {anonymous}::X86AsmBackend::applyFixup(const llvm::MCAssembler&,
const llvm::MCFixup&, const llvm::MCValue&, llvm::MutableArrayRef<char>,
uint64_t, bool) const: Assertion `isIntN(Size * 8 + 1, Value) && "Value does
not fit in the Fixup field"' failed.
[etc.]
----------------------------------------------------------------------
clang x86-64 version: clang version 6.0.0 (trunk 317827)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs