[llvm-bugs] [Bug 35873] New: misleading data sharing error message for const variable
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jan 9 04:59:16 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=35873
Bug ID: 35873
Summary: misleading data sharing error message for const
variable
Product: OpenMP
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Clang Compiler Support
Assignee: unassignedclangbugs at nondot.org
Reporter: trass3r at gmail.com
CC: llvm-bugs at lists.llvm.org
https://godbolt.org/g/X6XySq
void foo(const int rows)
{
#pragma omp parallel for default(none) firstprivate(rows)
for (int row = 0; row < rows; ++row)
{
}
}
$ clang-cl -Xclang -fopenmp -c test.cpp
test.cpp(4,26): error: variable 'rows' must have explicitly specified data
sharing attributes
This is very misleading as rows _is_ specified.
It would be better to output something conveying "rows is shared because of
const".
gcc just accepts the code btw.
--
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/20180109/c2385bc4/attachment.html>
More information about the llvm-bugs
mailing list