<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - undefined reference to `__sqrtl_finite' when using LLVM with Linaro's GCC-4.7"
href="http://llvm.org/bugs/show_bug.cgi?id=16707">16707</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>undefined reference to `__sqrtl_finite' when using LLVM with Linaro's GCC-4.7
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>winglet13@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>sqrtl.c:
#include <math.h>
int main(){
volatile long double a=123;
volatile long double c;
c = sqrtl(a);
return c;
}
LLVM generates call to __sqrtl_finite, but GCC, at -O0 generates call to sqrt.
LLVM:
clang
--sysroot=<PATH_TO_GCC47>/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux
-O3 -ffast-math -fmath-errno -marm sqrtl.c -S -o clang.s -mfloat-abi=hard
arm-linux-gnueabihf-g++ -O3 -ffast-math -fmath-errno -marm clang.s -lm
/tmp/ccHQeKP4.o: In function `main':
sqrtl.c:(.text+0x24): undefined reference to `__sqrtl_finite'
collect2: error: ld returned 1 exit status
GCC-4.7:
arm-linux-gnueabihf-g++ -O0 -ffast-math -fmath-errno -marm sqrtl.c -S -o gcc.s</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>