[LLVMbugs] [Bug 7821] New: llc crashes on an unimplemented constant expression

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 4 17:14:53 PDT 2010


           Summary: llc crashes on an unimplemented constant expression
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: actong88 at gmail.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=5328)
 --> (http://llvm.org/bugs/attachment.cgi?id=5328)
test case

Constant expressions in the form of a pointer to integer and then back to
pointer conversion, where the integer size does not match the pointer size,
cause llc to crash.

Output from compiling the attached test case on a 64bit machine:

$ ~/src/llvm/Debug+Asserts/bin/llc test.bc
i64 zext (i32 ptrtoint (i32* @val to i32) to i64)
FIXME: Don't support this constant expr
UNREACHABLE executed at AsmPrinter.cpp:1268!
0  llc             0x0000000001308c78
1  llc             0x0000000001308b3c
2  libpthread.so.0 0x00007f5fded278f0
3  libc.so.6       0x00007f5fde016a75 gsignal + 53
4  libc.so.6       0x00007f5fde01a5c0 abort + 384
5  llc             0x00000000012e51d1
6  llc             0x0000000000eb8ee8
7  llc             0x0000000000eb9136
8  llc             0x0000000000eba5ef
9  llc             0x0000000000eba68d
llvm::AsmPrinter::EmitGlobalConstant(llvm::Constant const*, unsigned int) + 109
10 llc             0x0000000000eb4754
llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*) + 2656
11 llc             0x0000000000eb66d6
llvm::AsmPrinter::doFinalization(llvm::Module&) + 164
12 llc             0x000000000127b6ae
llvm::FPPassManager::doFinalization(llvm::Module&) + 76
13 llc             0x000000000127b5be
llvm::FPPassManager::runOnModule(llvm::Module&) + 156
14 llc             0x000000000127b8bb
llvm::MPPassManager::runOnModule(llvm::Module&) + 459
15 llc             0x000000000127bdfb llvm::PassManagerImpl::run(llvm::Module&)
+ 125
16 llc             0x000000000127c307 llvm::PassManager::run(llvm::Module&) +
17 llc             0x00000000009a7e64 main + 2266
18 libc.so.6       0x00007f5fde001c4d __libc_start_main + 253
19 llc             0x00000000009a6c89
Stack dump:
0.    Program arguments: /home/actong/src/llvm/Debug+Asserts/bin/llc test.bc 
1.    Running pass 'Function Pass Manager' on module 'test.bc'.

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