<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - [OpenCL 2.0] Improve diagnostics for reading with sampler from read_write images."
href="https://llvm.org/bugs/show_bug.cgi?id=24937">24937</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[OpenCL 2.0] Improve diagnostics for reading with sampler from read_write images.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>aleksey.bader@mail.ru
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>According to The OpenCL C Specification (Version: 2.0):
"Calls to built-ins that read from an image using a sampler for images declared
with the __read_write (or read_write)qualifier will be a compilation error."
Here is example of this error:
typedef float float4 __attribute__((ext_vector_type(4)));
typedef int int2 __attribute__((ext_vector_type(2)));
// declaration of read_image built-in function.
float4 __attribute__((overloadable)) read_imagef(__read_only image2d_t image,
sampler_t sampler, int2 coord);
kernel void test(read_write image2d_t image, sampler_t s) {
float4 f = read_imagef(image, s, (int2)(0,0)); // compilation error is
expected
}
Clang compiles this code without reporting any errors.</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>