<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 if <complex> is included"
href="https://bugs.llvm.org/show_bug.cgi?id=50383">50383</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>CUDA compilation fails if <complex> is included
</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>Linux
</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>CUDA
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dontbugme@mailinator.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>The file: "/usr/include/c++/11.1.0/complex" contains function named "polar",
which does the following test:
__glibcxx_assert( __rho >= 0 );
which breaks CUDA compilation. Commenting the above line solves the issue. The
error is as follows:
error: __host__ __device__ function '__failed_assertion' cannot overload
__host__ function '__failed_assertion'
__glibcxx_assert( __rho >= 0 );
^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../include/c++/11.1.0/x86_64-pc-linux-gnu/bits/c++config.h:754:5:
note: expanded from macro '__glibcxx_assert'
__glibcxx_assert_1(_Condition) \
^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../include/c++/11.1.0/x86_64-pc-linux-gnu/bits/c++config.h:743:13:
note: expanded from macro '__glibcxx_assert_1'
void __failed_assertion(); \
^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../include/c++/11.1.0/bits/atomic_base.h:266:7:
note: previous declaration is here
__glibcxx_assert(__b != memory_order_consume);
^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../include/c++/11.1.0/x86_64-pc-linux-gnu/bits/c++config.h:754:5:
note: expanded from macro '__glibcxx_assert'
__glibcxx_assert_1(_Condition) \
^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../include/c++/11.1.0/x86_64-pc-linux-gnu/bits/c++config.h:743:13:
note: expanded from macro '__glibcxx_assert_1'
void __failed_assertion(); \
^</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>