[llvm-bugs] [Bug 46347] New: An iteration of a loop execute more than one ordered region which throw an error
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jun 16 03:12:10 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46347
Bug ID: 46347
Summary: An iteration of a loop execute more than one ordered
region which throw an error
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Clang Compiler Support
Assignee: unassignedclangbugs at nondot.org
Reporter: yangzh.fnst at cn.fujitsu.com
CC: llvm-bugs at lists.llvm.org
Hi,
Follow the OpenMP's Specfications:
During execution of an iteration of a worksharing-loop or a loop nest within a
worksharing-loop, simd, or worksharing-loop SIMD region, a thread must not
execute more than one ordered region corresponding to an ordered construct
without a depend clause.
https://www.openmp.org/spec-html/5.0/openmpsu97.html#x128-5010002.17.9
The following code shoule be error. But there is no error.
Example_ordered.2.c: This code comes from
https://www.openmp.org/wp-content/uploads/openmp-examples-5.0.0.pdf
void work(int i) {}
void ordered_wrong(int n)
{
int i;
#pragma omp for ordered
for (i=0; i<n; i++) {
/* incorrect because an iteration may not execute more than one
ordered region */
#pragma omp ordered
work(i);
#pragma omp ordered
work(i+1);
}
}
clang version: clang10.0.0
command:
clang -fopenmp -S test.c
--
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/20200616/b6e4f853/attachment.html>
More information about the llvm-bugs
mailing list