http://llvm.org/bugs/show_bug.cgi?id=17693
Bug ID: 17693
Summary: multiplying long long with fsanitize=integer fails
with undefined reference to __mulodi4
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Multiplying two long long integers fails when using -fsanitze=integer:
$ cat tst.c
#include <stdlib.h>
int main(int argc, char **argv)
{
long long x = atoi(argv[1]);
long long y = atoi(argv[2]);
long long z = x * y;
return 0;
}
$ clang --version
clang version 3.4 (trunk 193413)
Target: i386-pc-linux-gnu
Thread model: posix
$ clang -fsanitize=integer tst.c
/tmp/tst-f4b367.o: In function `main':
tst.c:(.text+0x82): undefined reference to `__mulodi4'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$ clang tst.c
$
This works on x86_64, though, but not when using -m32:
x86-64 $ clang --version
clang version 3.4 (trunk 193417)
Target: x86_64-unknown-linux-gnu
Thread model: posix
x86-64 $ clang -fsanitize=integer -m32 tst.c
/tmp/tst-723c9c.o: In function `main':
tst.c:(.text+0x82): undefined reference to `__mulodi4'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
x86-64 $ clang -fsanitize=integer tst.c
x86-64 $ clang -m32 tst.c
x86-64 $
Perhaps related to http://llvm.org/bugs/show_bug.cgi?id=14469 ?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs