[llvm-bugs] [Bug 26481] New: CUDA __global__ lambdas shouldn't be allowed to capture by reference
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Feb 4 13:44:07 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26481
Bug ID: 26481
Summary: CUDA __global__ lambdas shouldn't be allowed to
capture by reference
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: justin.lebar at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
The following CUDA code should be an error, as __global__ lambdas aren't
allowed to capture variables by reference.
void foo() {
int v;
auto x = [&v] () __global__ { };
}
Today it's a different error:
test.cu:3:17: error: kernel function type '<dependent type> () const' must have
void return type
auto x = [&v] () __global__ { };
We get this error with or without a capture-by-reference, but that's a separate
issue.
--
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/20160204/548c758d/attachment-0001.html>
More information about the llvm-bugs
mailing list