<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 - Code compiled with -Ofast fails to find math symbols. (eg `__expf_finite')"
href="https://bugs.llvm.org/show_bug.cgi?id=45034">45034</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Code compiled with -Ofast fails to find math symbols. (eg `__expf_finite')
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>9.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>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nheart@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23175" name="attach_23175" title="simple testcase.">attachment 23175</a> <a href="attachment.cgi?id=23175&action=edit" title="simple testcase.">[details]</a></span>
simple testcase.
Hey,
After some recent changes, various projects fail to compile with clang when
using -Ofast ( or -O2 -ffast-math ). Example bugs from the web:
<a href="https://github.com/cms-sw/cmssw/issues/24935">https://github.com/cms-sw/cmssw/issues/24935</a>
<a href="https://github.com/dpiparo/vdt/issues/11">https://github.com/dpiparo/vdt/issues/11</a>
<a href="https://bugs.archlinux.org/task/65541">https://bugs.archlinux.org/task/65541</a>
I have attached a sample file that triggers the bug, taken from the Arch
bugtracker:
clang++ bug.cpp works
clang++ bug.cpp -Ofast fails with:
/usr/bin/ld: /tmp/bug-6a1f7c.o: in function `main':
bug.cpp:(.text+0xd): undefined reference to `__expf_finite'
clang-9: error: linker command failed with exit code 1 (use -v to see
invocation)
According to the arch user, this is likely related to
<a href="https://reviews.llvm.org/D74712">https://reviews.llvm.org/D74712</a>
Cheers,
Nick</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>