[LLVMbugs] [Bug 19507] New: Crash on __popcountti2 while bootstrapping

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 21 23:42:19 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19507

            Bug ID: 19507
           Summary: Crash on __popcountti2 while bootstrapping
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gribozavr at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

$ clang --version
clang version 3.5.0 (206800)
Target: x86_64-unknown-linux-gnu
Thread model: posix

$ cat popcountti2-17737c.c
typedef int      ti_int __attribute__ ((mode (TI)));
typedef unsigned tu_int __attribute__ ((mode (TI)));

int __popcountti2(ti_int a)
{
    tu_int x3 = (tu_int)a;
    x3 = x3 - ((x3 >> 1) & (((tu_int)0x5555555555555555uLL << 64) |
                                     0x5555555555555555uLL));
    return x3 >> 64;
}

$ /home/llvmbb/bin/clang-latest/bin/clang-3.5 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name popcountti2.c
-mrelocation-model pic -pic-level 2 -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -O3  popcountti2-17737c.c
clang-3.5: /home/llvmbb/clang/llvm/include/llvm/ADT/APInt.h:1305: uint64_t
llvm::APInt::getZExtValue() const: Assertion `getActiveBits() <= 64 && "Too
many bits for uint64_t"' failed.
0  clang-3.5       0x000000000123f772 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang-3.5       0x000000000123f394
2  libpthread.so.0 0x00007f2e8f0ef880
3  libc.so.6       0x00007f2e8e3373a9 gsignal + 57
4  libc.so.6       0x00007f2e8e33a4c8 abort + 328
5  libc.so.6       0x00007f2e8e3304c6
6  libc.so.6       0x00007f2e8e330572
7  clang-3.5       0x0000000001653823
isExtractBitsCandidateUse(llvm::Instruction*) + 211
8  clang-3.5       0x000000000165bcc0
9  clang-3.5       0x000000000165c978
10 clang-3.5       0x0000000000fd622f
llvm::FPPassManager::runOnFunction(llvm::Function&) + 655
11 clang-3.5       0x0000000000fd66fb
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
12 clang-3.5       0x0000000000fd6a3d
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 797
13 clang-3.5       0x0000000001839f9e
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) +
2942
14 clang-3.5       0x0000000001834fe9
15 clang-3.5       0x0000000001c0c41b clang::ParseAST(clang::Sema&, bool, bool)
+ 507
16 clang-3.5       0x00000000018359fb clang::CodeGenAction::ExecuteAction() +
59
17 clang-3.5       0x000000000138bf06 clang::FrontendAction::Execute() + 150
18 clang-3.5       0x000000000136d7d0
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 352
19 clang-3.5       0x0000000001406832
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1810
20 clang-3.5       0x00000000008674b8 cc1_main(char const**, char const**, char
const*, void*) + 1240
21 clang-3.5       0x0000000000840eb3 main + 755
22 libc.so.6       0x00007f2e8e323b45 __libc_start_main + 245
23 clang-3.5       0x0000000000865309
Stack dump:
0.    Program arguments: /home/llvmbb/bin/clang-latest/bin/clang-3.5 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
popcountti2.c -mrelocation-model pic -pic-level 2 -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -O3 popcountti2-17737c.c
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'popcountti2-17737c.c'.
4.    Running pass 'CodeGen Prepare' on function '@__popcountti2'
Aborted

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140422/4dd445fb/attachment.html>


More information about the llvm-bugs mailing list