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: unassignedclangb...@nondot.org
Reporter: tras...@gmail.com
CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs