[LLVMbugs] [Bug 2612] New: Code snippet fails with assert
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Jul 30 02:34:30 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2612
Summary: Code snippet fails with assert
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rich at pennware.com
CC: llvmbugs at cs.uiuc.edu
The following code fails with an assert both in llvm-ld and llc:
; ModuleID = 't0034.ubc'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-s0:0:64-f80:32:32"
target triple = "i686-pc-linux-gnu"
@current_foo = internal global { } zeroinitializer ; <{ }*>
[#uses=1]
define i32 @main(...) {
entry:
%retval = alloca i32 ; <i32*> [#uses=2]
store i32 0, i32* %retval
%local_foo = alloca { } ; <{ }*> [#uses=1]
load { }* @current_foo ; <{ }>:0 [#uses=1]
store { } %0, { }* %local_foo
br label %return
return: ; preds = %entry
load i32* %retval ; <i32>:1 [#uses=1]
ret i32 %1
}
llc:
/home/rich/llvm-trunk-new/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1263:
llvm::SDOperand llvm::SelectionDAGLowering::getValue(const llvm::Value*):
Assertion `InReg && "Value not in map!"' failed.
llc[0x8b5c22a]
llc[0x8b5c35c]
[0x110400]
/lib/libc.so.6(abort+0x101)[0xa62f91]
/lib/libc.so.6(__assert_fail+0xee)[0xa5a93e]
llc(_ZN4llvm20SelectionDAGLowering8getValueEPKNS_5ValueE+0x1068)[0x882f89a]
llc(_ZN4llvm20SelectionDAGLowering10visitStoreERNS_9StoreInstE+0x3e)[0x8837a32]
llc(_ZN4llvm20SelectionDAGLowering5visitEjRNS_4UserE+0x28f)[0x885d89b]
llc(_ZN4llvm20SelectionDAGLowering5visitERNS_11InstructionE+0x28)[0x885db38]
llc(_ZN4llvm16SelectionDAGISel17BuildSelectionDAGERNS_12SelectionDAGEPNS_10BasicBlockERSt6vectorISt4pairIPNS_12MachineInstrEjESaIS9_EERNS_20FunctionLoweringInfoE+0x3a4)[0x8840922]
llc(_ZN4llvm16SelectionDAGISel16SelectBasicBlockEPNS_10BasicBlockERNS_15MachineFunctionERNS_20FunctionLoweringInfoERNS_5alistINS_6SDNodeENS_10LoadSDNodeEEE+0xb7)[0x884113b]
llc(_ZN4llvm16SelectionDAGISel20SelectAllBasicBlocksERNS_8FunctionERNS_15MachineFunctionERNS_20FunctionLoweringInfoE+0x8f)[0x8842981]
llc(_ZN4llvm16SelectionDAGISel13runOnFunctionERNS_8FunctionE+0x210)[0x88434e2]
llc[0x8748cbb]
llc(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x135)[0x8ae9847]
llc(_ZN4llvm23FunctionPassManagerImpl3runERNS_8FunctionE+0x6e)[0x8ae9acc]
llc(_ZN4llvm19FunctionPassManager3runERNS_8FunctionE+0x89)[0x8ae9c1b]
llc(main+0x9a2)[0x83d6244]
/lib/libc.so.6(__libc_start_main+0xe0)[0xa4e390]
llc[0x83d48d1]
Abort
llvm-ld: /home/rich/llvm-trunk-new/include/llvm/Support/Casting.h:199: typename
llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
llvm::StoreInst, Y = llvm::User*]: Assertion `isa<X>(Val) && "cast<Ty>()
argument of incompatible type!"' failed.
llvm-ld[0x84e6ffa]
llvm-ld[0x84e712c]
[0x110400]
/lib/libc.so.6(abort+0x101)[0xa62f91]
/lib/libc.so.6(__assert_fail+0xee)[0xa5a93e]
llvm-ld(_ZN4llvm4castINS_9StoreInstEPNS_4UserEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_+0x4c)[0x831bdfa]
llvm-ld[0x833da78]
llvm-ld(_ZN4llvm13MPPassManager11runOnModuleERNS_6ModuleE+0x100)[0x847534e]
llvm-ld(_ZN4llvm15PassManagerImpl3runERNS_6ModuleE+0x6e)[0x8475506]
llvm-ld(_ZN4llvm11PassManager3runERNS_6ModuleE+0x1b)[0x8475559]
llvm-ld(_ZN4llvm8OptimizeEPNS_6ModuleE+0x415)[0x8264d7b]
llvm-ld(main+0x6b0)[0x826c6a8]
/lib/libc.so.6(__libc_start_main+0xe0)[0xa4e390]
llvm-ld(__gxx_personality_v0+0x309)[0x8264311]
Abort
--
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