[llvm-bugs] [Bug 31988] segfault in __kmpc_for_static_init_4 running c++ example containing omp distribute private
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Aug 16 07:28:31 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=31988
Alexey Bataev <a.bataev at hotmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |a.bataev at hotmail.com
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Alexey Bataev <a.bataev at hotmail.com> ---
Your program does not meet the requirements of the OpenMP standard. Each
distribute construct must be strictly nested inside a teams region. The
following program works:
int main() {
constexpr int x_outer = 1;
int x = x_outer;
#pragma omp target teams
#pragma omp distribute private(x)
for (int i = 0; i < 1; ++i)
;
}
Also, the next one works:
int foo() {
constexpr int x_outer = 1;
int x = x_outer;
#pragma omp distribute private(x)
for (int i = 0; i < 1; ++i)
;
return 0;
}
int main() {
#pragma omp target teams
foo();
return 0;
}
--
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/20170816/3383ab4c/attachment-0001.html>
More information about the llvm-bugs
mailing list