[LLVMbugs] [Bug 13028] New: crash with ffsll()
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jun 5 04:29:59 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13028
Bug #: 13028
Summary: crash with ffsll()
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: markokr at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Following code crashes with clang -O2, both 3.0 and trunk, have not trid other
branches.
-----------------------------
extern int ffsll (long long int v);
int test_ffs(void);
int test_ffs(void)
{
return ffsll(0);
}
-----------------------------
$ clang -O2 -c -o xxx.o xxx.c
clang: /opt/src/llvm/llvm/lib/VMCore/Value.cpp:301: void
llvm::Value::replaceAllUsesWith(llvm::Value *): Assertion `New->getType() ==
getType() && "replaceAllUses of value with new value of different type!"'
failed.
0 clang 0x09b78e9b
Stack dump:
0. Program arguments: /opt/apps/llvm/bin/clang -cc1 -triple
i386-pc-linux-gnu -emit-obj -disable-free -main-file-name xxx.c
-mrelocation-model static -fmath-errno -masm-verbose -mconstructor-aliases
-target-cpu pentium4 -target-linker-version 2.20.1 -momit-leaf-frame-pointer
-coverage-file xxx.o -resource-dir /opt/apps/llvm/bin/../lib/clang/3.2
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/opt/apps/llvm/bin/../lib/clang/3.2/include -internal-externc-isystem
/usr/include/i486-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O2 -fdebug-compilation-dir
/home/marko/src/libusual/test -ferror-limit 19 -fmessage-length 199
-mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o xxx.o -x c
xxx.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'xxx.c'.
4. Running pass 'Simplify well-known library calls' on function '@test_ffs'
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang version 3.2 (trunk 157759)
Target: i386-pc-linux-gnu
Thread model: posix
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/xxx-MhE8IG.i
clang: note: diagnostic msg: /tmp/xxx-MhE8IG.sh
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list