[LLVMbugs] [Bug 2221] New: Assertion failure when inlining function.
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Apr 13 10:27:08 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2221
Summary: Assertion failure when inlining function.
Product: libraries
Version: 2.2
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Transformation Utilities
AssignedTo: unassignedbugs at nondot.org
ReportedBy: fvbommel at wxs.nl
CC: llvmbugs at cs.uiuc.edu
I have some code that generates an assertion failure when I try to run "opt
-inline" on it:
-----
; ModuleID = 'out.bc'
define i64 (i64)* @getFn(i64) {
entry:
%ptr = inttoptr i64 %0 to i64 (i64)* ; <i64 (i64)*>
[#uses=1]
ret i64 (i64)* %ptr
}
define i64 @fn() {
entry:
%func = call i64 (i64)* (i64)* @getFn( i64 ptrtoint (i64 (i64)* @fn1 to
i64) ) ; <i64 (i64)*> [#uses=1]
%call = call i64 %func( i64 0 ) ; <i64> [#uses=1]
ret i64 %call
}
define i64 @fn1(i64) align 4 {
entry:
ret i64 0
}
-----
$ opt out.bc -o opt.bc -f -inline
opt: CallGraph.cpp:288: void
llvm::CallGraphNode::removeCallEdgeTo(llvm::CallGraphNode*): Assertion `i &&
"Cannot find callee to remove!"' failed.
opt((anonymous namespace)::PrintStackTrace()+0x15)[0x769f75]
opt((anonymous namespace)::SignalHandler(int)+0x216)[0x76a306]
/lib/libc.so.6[0x2ad5f8b017d0]
/lib/libc.so.6(gsignal+0x35)[0x2ad5f8b01765]
/lib/libc.so.6(abort+0x110)[0x2ad5f8b031c0]
/lib/libc.so.6(__assert_fail+0xef)[0x2ad5f8afac2f]
opt(llvm::CallGraph::destroy()+0x0)[0x627ca0]
opt(llvm::InlineFunction(llvm::CallSite, llvm::CallGraph*, llvm::TargetData
const*)+0xc17)[0x5df9f7]
opt(llvm::Inliner::runOnSCC(std::vector<llvm::CallGraphNode*,
std::allocator<llvm::CallGraphNode*> > const&)+0x8c7)[0x4bafd7]
opt(CGPassManager::runOnModule(llvm::Module&)+0x5b8)[0x62a0c8]
opt(llvm::MPPassManager::runOnModule(llvm::Module&)+0x1c5)[0x70cd75]
opt(llvm::PassManagerImpl::run(llvm::Module&)+0x72)[0x70d062]
opt(llvm::PassManager::run(llvm::Module&)+0xc)[0x70d0bc]
opt(main+0x608)[0x493ac8]
/lib/libc.so.6(__libc_start_main+0xf4)[0x2ad5f8aedb44]
opt(sinh+0x41)[0x48cc49]
Aborted (core dumped)
$ opt --version
Low Level Virtual Machine (http://llvm.org/):
llvm version 2.2
Optimized build with assertions.
--
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