<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 - Function pointer in template argument"
   href="https://bugs.llvm.org/show_bug.cgi?id=44788">44788</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Function pointer in template argument
          </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>drohr@jwdt.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>anastasia.stulova@arm.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23092" name="attach_23092" title="Testcase">attachment 23092</a> <a href="attachment.cgi?id=23092&action=edit" title="Testcase">[details]</a></span>
Testcase

The attached testcase fails compilation with C++ for OpenCL

Compile command: clang++ -cl-std=clc++ -x cl -emit-llvm
--target=spir64-unknown-unknown -O3 -c test.cl -o test.bc

Clang version: latest master, commit 12fe9b26ec88bb2dd40d574a644edca302e804b2

Error message:
clang-10: warning: Unknown CUDA version 10.2. Assuming the latest supported
version 10.1 [-Wunknown-cuda-version]
test.cl:11:10: error: taking address of function is not allowed
    test(foo);
         ^
1 error generated.

The OpenCL C++ spec says: function pointers ... [are not supported by OpenCL
C++] unless they are a compile-time constant expression.
I am not sure about clang C++ for OpenCL, but I think this would be an
interesting feature to support for using modern C++.</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>