<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 - image2d_depth_t shouldn't be available in OpenCL 1.1"
   href="https://bugs.llvm.org/show_bug.cgi?id=47919">47919</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>image2d_depth_t shouldn't be available in OpenCL 1.1
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>OpenCL
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>marco.antognini@arm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>anastasia.stulova@arm.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When compiling the following for OpenCL 1.1 Clang doesn't reject the usage of
image2d_depth_t.

float bar(read_only image2d_depth_t image, sampler_t sampler, int2 coord) {
    return read_imagef(image, sampler, coord);
}

<a href="https://godbolt.org/z/MsjKjr">https://godbolt.org/z/MsjKjr</a>

The image2d_depth_t type
 - is defined in extension cl_khr_depth_images for OpenCL 1.2 (and the
extension is disabled by default), and
 - is a core feature in OpenCL 2.0 and later.

Interestingly, Clang accepts this program when using -fdeclare-opencl-builtins.
It is rejected when using `opencl-c.h`, but for another (valid) reason: the
overload of read_imagef using this image type is not available.

Somewhat related to <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Not all OpenCL extensions are disabled by default"
   href="show_bug.cgi?id=47882">Bug 47882</a>.</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>