<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 - Assert when combining 'kernel' and attribute-overloadable on windows."
   href="https://bugs.llvm.org/show_bug.cgi?id=45308">45308</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assert when combining 'kernel' and attribute-overloadable on windows.
          </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>Windows NT
          </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>erich.keane@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>anastasia.stulova@arm.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>See: <a href="https://godbolt.org/z/qrARTd">https://godbolt.org/z/qrARTd</a>

__attribute__((overloadable))
kernel void foo(){}

'foo' needs to be mangled (because of overloadable), but has a calling
convention that the windows mangler doesn't know about.

We either need to teach MicrosoftMangler to support this mangling, or disallow
attribute-overloadable and 'kernel' to be used together.  Filing the defect
because I'm not sure what the right answer is and want feedback from others.

Unsupported CC for mangling
UNREACHABLE executed at
/iusers/ekeane1/workspaces/llvm-project/clang/lib/AST/MicrosoftMangle.cpp:2402!

The CC value is clang::CC_OpenCLKernel.</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>