[llvm-bugs] [Bug 50333] New: array shaping not accepted in target update to/from clause
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu May 13 13:55:44 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50333
Bug ID: 50333
Summary: array shaping not accepted in target update to/from
clause
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: OpenMP
Assignee: unassignedclangbugs at nondot.org
Reporter: michael.p.rice at intel.com
CC: llvm-bugs at lists.llvm.org
The array_shaping.1.c example from
https://www.openmp.org/wp-content/uploads/openmp-examples-5-0-1.pdf (p. 50)
does not compile with clang.
This seems to be explicitly allowed in page 208, line 15 of the 5.1
specification.
void array_shaping(double *a, int nx, int ny)
{
// map data to device and do work
#pragma omp target data map(a[0:nx*(ny+2)])
{
#pragma omp target update from( (([nx][ny+2])a)[0:nx][1], \
(([nx][ny+2])a)[0:nx][ny] )
}
}
$ clang -c -fopenmp t.c
t.c:6:39: error: OpenMP array shaping operation is not allowed here
#pragma omp target update from( (([nx][ny+2])a)[0:nx][1], \
^
--
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/20210513/772637ee/attachment.html>
More information about the llvm-bugs
mailing list