http://llvm.org/bugs/show_bug.cgi?id=17476
Bug ID: 17476
Summary: Crashes building lld
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Reduced testcase:
struct string {
string(const char *__s);
string &operator+=(const string &__str);
};
template <class ELFT> void finalizeDefaultAtomValues() {
auto startEnd = [&](const char * sym)->void {
string start("__");
start += sym;
}
;
startEnd("preinit_array");
}
void f() { finalizeDefaultAtomValues<int>(); }
$ clang -cc1 -std=c++11 Writer.ii -emit-llvm
clang: /home/espindola/llvm/llvm/tools/clang/lib/CodeGen/CGExpr.cpp:1784:
clang::CodeGen::LValue clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(const
clang::DeclRefExpr*): Assertion `isa<BlockDecl>(CurCodeDecl) &&
E->refersToEnclosingLocal()' failed.
0 clang 0x0000000001da88f4 llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1 clang 0x0000000001da8b71
2 clang 0x0000000001da852e
3 libpthread.so.0 0x00000032ef80efa0
4 libc.so.6 0x00000032ef435a19 gsignal + 57
5 libc.so.6 0x00000032ef437128 abort + 328
6 libc.so.6 0x00000032ef42e986
7 libc.so.6 0x00000032ef42ea32
8 clang 0x0000000001f3c215
clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(clang::DeclRefExpr const*) +
1433
9 clang 0x0000000001f37345
clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) + 481
10 clang 0x0000000001f37054
clang::CodeGen::CodeGenFunction::EmitCheckedLValue(clang::Expr const*,
clang::CodeGen::CodeGenFunction::TypeCheckKind) + 278
--
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