<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 - Using both -x cuda and -fopenmp complex wrappers block compilation"
   href="https://bugs.llvm.org/show_bug.cgi?id=48014">48014</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Using both -x cuda and -fopenmp complex wrappers block compilation
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>11.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>OpenMP
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>joachim@joameyer.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is very related to <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - CUDA and OpenMP math functions conflicts (using both -xcuda and -fopenmp)"
   href="show_bug.cgi?id=45533">Bug 45533</a>.
If compiling with both -x cuda and -fopenmp (the latter to target CPU), a
number of errors similar to the following are emitted:

In file included from <built-in>:1:
In file included from
/home/joachim/Projekte/sycl/install/llvm11/lib/clang/11.0.0/include/__clang_cuda_runtime_wrapper.h:406:
/home/joachim/Projekte/sycl/install/llvm11/lib/clang/11.0.0/include/__clang_cuda_complex_builtins.h:76:7:
error: no matching function for call to '__nv_isnand'
  if (_ISNANd(__real__(z)) && _ISNANd(__imag__(z))) {
      ^~~~~~~
/home/joachim/Projekte/sycl/install/llvm11/lib/clang/11.0.0/include/__clang_cuda_complex_builtins.h:47:17:
note: expanded from macro '_ISNANd'
#define _ISNANd __nv_isnand
                ^~~~~~~~~~~
/home/joachim/Projekte/sycl/install/llvm11/lib/clang/11.0.0/include/__clang_cuda_libdevice_declares.h:226:16:
note: candidate function not viable: call to __device__ function from __host__
function
__DEVICE__ int __nv_isnand(double __a);

This is fixed in <a href="https://reviews.llvm.org/D90415">https://reviews.llvm.org/D90415</a> for master.
As this is the only missing piece to get the combination of -x cuda and
-fopenmp running with clang 11, I would suggest to backport the change to
release/11.x as well.</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>