<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 - Optimizer hangs with std::complex and -ffast-math"
href="https://bugs.llvm.org/show_bug.cgi?id=34078">34078</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Optimizer hangs with std::complex and -ffast-math
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>4.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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>lkoppel@uwaterloo.ca
</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=18911" name="attach_18911" title="reduced .bc file from bugpoint">attachment 18911</a> <a href="attachment.cgi?id=18911&action=edit" title="reduced .bc file from bugpoint">[details]</a></span>
reduced .bc file from bugpoint
clang++ hangs indefinitely when compiling the following code with -O2
-ffast-math
#include <complex>
void f(double A) {
double B = 1. - A - pow(A, 2) / 2.;
std::complex<double> C = B + B;
std::complex<double> D = 1. / C;
}
or the following code with -O1 -ffast-math
#include <complex>
void f(double A) {
double B = 1. - A - pow(A, 2) / 2.;
std::complex<double> C = B + B;
}
(I originally observed the bug while compiling
<a href="https://github.com/laurentkneip/opengv/blob/master/src/math/roots.cpp">https://github.com/laurentkneip/opengv/blob/master/src/math/roots.cpp</a>, and
reduced).
Bugpoint suggests it is the reassociate pass. Reduced output attached.</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>