[LLVMbugs] [Bug 15991] New: lambdas + thread_local result in an assertion failure

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon May 13 23:42:32 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15991

            Bug ID: 15991
           Summary: lambdas + thread_local result in an assertion failure
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This causes IRGen to assert:

int f() {
  thread_local int n;
  auto l = [] { return n; };
  return l();
}

Viz:

lib/CodeGen/CGExpr.cpp:1861: clang::CodeGen::LValue
clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(const clang::DeclRefExpr *):
Assertion `isa<BlockDecl>(CurCodeDecl) && E->refersToEnclosingLocal()' failed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130514/fcdfb937/attachment.html>


More information about the llvm-bugs mailing list