[llvm-bugs] [Bug 38623] New: Assertion in CodeGen fails when a reference to a global variable is captured by a block

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 17 19:21:03 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38623

            Bug ID: 38623
           Summary: Assertion in CodeGen fails when a reference to a
                    global variable is captured by a block
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ahatanak at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

$ cat test.cpp
int b;

void test() {
  int &a = b;
  ^{ a = 2; };
}

$ clang++ -c -o /dev/null test.cpp

Assertion failed: (it != Captures.end() && "no entry for variable!"), function
getCapture, file llvm/tools/clang/lib/CodeGen/CGBlocks.h, line 277.

-- 
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/20180818/57d383c1/attachment.html>


More information about the llvm-bugs mailing list