<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 - Regression: Accessing object in target region: "expected expression containing only member accesses and/or array sections based on named variables""
href="https://bugs.llvm.org/show_bug.cgi?id=45212">45212</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Regression: Accessing object in target region: "expected expression containing only member accesses and/or array sections based on named variables"
</td>
</tr>
<tr>
<th>Product</th>
<td>OpenMP
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>Clang Compiler Support
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>csdaley@lbl.gov
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23233" name="attach_23233" title="Reproducer for compiler error">attachment 23233</a> <a href="attachment.cgi?id=23233&action=edit" title="Reproducer for compiler error">[details]</a></span>
Reproducer for compiler error
The attached test program no longer compiles with the LLVM/Clang compiler when
using the -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda compiler options. The
compiler error message is "error: expected expression containing only member
accesses and/or array sections based on named variables".
The test program maps a custom array object to the device. The data inside the
array object is accessed via an overloaded () operator. The key code from the
test program is shown below.
#pragma omp target enter data map(to:pos)
#pragma omp target enter data map(to:pos.dptr[0:pos.size])
#pragma omp target teams distribute parallel for
for(int i=0; i<100; i++) {
pos(i).x = i;
pos(i).y = i+1;
}
This seems to be a very recent regression. The test program compiles and runs
correctly when using a commit from Feb 19 and fails when using a commit from
Mar 13.
Feb 19 - commit 63cef621f954eb87c494021725f4eeac89132d16: SUCCESS
Mar 13 - commit 20e36f31dfc1bb079dc6e6db5f692a4e90aa0c9d: FAIL</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>