<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - array shaping not accepted in target update to/from clause"
href="https://bugs.llvm.org/show_bug.cgi?id=50333">50333</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>array shaping not accepted in target update to/from clause
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>OpenMP
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>michael.p.rice@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>The array_shaping.1.c example from
<a href="https://www.openmp.org/wp-content/uploads/openmp-examples-5-0-1.pdf">https://www.openmp.org/wp-content/uploads/openmp-examples-5-0-1.pdf</a> (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], \
^</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>