https://llvm.org/bugs/show_bug.cgi?id=27877
Bug ID: 27877 Summary: ordered clause on pragma for does not respect semantics Product: OpenMP Version: unspecified Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: Runtime Library Assignee: unassignedb...@nondot.org Reporter: carlo.berto...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified The following testcase: #include <stdio.h> int main() { int s[10]; int count = 0; #pragma omp target if(0) #pragma omp parallel num_threads(8) { #pragma omp for ordered { for (int i=0;i<10;i++) { s[i] = count; count++; } } } for (int i=0;i<10;i++) { printf("%d\n", s[i]); } return 1; } prints out: 2 4 1 5 6 0 7 4 3 8 on latest clang+openMP from git repositories. Successive re-runs show different orders. I would have instead expected an ordered print of numbers from 0 to 9. -- 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