<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 --- - __int128_t multiply with -fsanitize=undefined fails to link (undefined reference to __muloti4)"
href="http://llvm.org/bugs/show_bug.cgi?id=16404">16404</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>__int128_t multiply with -fsanitize=undefined fails to link (undefined reference to __muloti4)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</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>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>peter.maydell@linaro.org
</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>clang fails to link code which does a multiply of two int128_t variables on
x86_64 if the code is compiled with -fsanitize=undefined : it fails with
"undefined reference to '__muloti4'. The same code compiles OK if the
-fsanitize argument is omitted:
cam-vm-266:precise:qemu$ cat /tmp/zz9.c
__int128_t a;
int main (void) {
a = a * a;
return 0;
}
cam-vm-266:precise:qemu$ clang /tmp/zz9.c -o /tmp/zz9
cam-vm-266:precise:qemu$ clang /tmp/zz9.c -fsanitize=undefined -o /tmp/zz9
/tmp/zz9-eAeaq5.o: In function `main':
/tmp/zz9.c:(.text+0x3b): undefined reference to `__muloti4'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
cam-vm-266:precise:qemu$ clang --version
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
(I'm using the prebuilt clang binaries on Ubuntu 12.04:
<a href="http://llvm.org/releases/3.3/clang+llvm-3.3-amd64-Ubuntu-12.04.2.tar.gz">http://llvm.org/releases/3.3/clang+llvm-3.3-amd64-Ubuntu-12.04.2.tar.gz</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>