Issue 83419
Summary clang: Assertion fail for simple _Bitint code
Labels clang
Assignees
Reporter dcb314
    Given this source code:

void f()
{
	static _BitInt(130) p = {}; 
}

then recent clang trunk does this:

$ clang -c bug38.c
clang: /home/dcb38/llvm/trunk/clang/lib/CodeGen/CGDecl.cpp:366: llvm::GlobalVariable* clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(const clang
::VarDecl&, llvm::GlobalVariable*): Assertion `VarSize == CstSize && "Emitted constant has unexpected size"' failed.

A slightly smaller size of 120 seems to work ok. It looks like the
boundary size is likely to be 128 or so.

If this is a fixed boundary, a tidy "not implemented" error message 
is better than an assertion fail and a crash.



_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to