<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 - CUDA compilation fails due to unknown type name '__device__' separate compilation and linking solves the problem"
   href="https://bugs.llvm.org/show_bug.cgi?id=34379">34379</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>CUDA compilation fails due to unknown type name '__device__' separate compilation and linking solves the problem
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>5.0
          </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>CUDA
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>lorenz.braun@ziti.uni-heidelberg.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19060" name="attach_19060" title="Streamcluster application with makefile to reproduce the error + log of the compilation with error">attachment 19060</a> <a href="attachment.cgi?id=19060&action=edit" title="Streamcluster application with makefile to reproduce the error + log of the compilation with error">[details]</a></span>
Streamcluster application with makefile to reproduce the error + log of the
compilation with error

The streamcluster application of the rodinia benchmark [0] cannot be compiled
with clang++. Compiling the source files in separate objects and linking them
afterwards works just fine. 

Changing the order included headers might help. 

Steps to reproduce:
1) extract tar
2) change path to cuda (i used cuda 8.0)
3) run make

Result: compilation fails

Expected Result: compilation is successful
(you can set NVCC to nvcc, then it works to)

Build-Date & Hardware:
2017-30-08
Linux octane 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC
2016 x86_64 x86_64 x86_64 GNU/Linux
CUDA 8.0
LLVM 5.0
not yet tested on trunk


[0] <a href="https://www.cs.virginia.edu/~skadron/wiki/rodinia/index.php/Main_Page">https://www.cs.virginia.edu/~skadron/wiki/rodinia/index.php/Main_Page</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>