[LLVMbugs] [Bug 6196] New: llc crash: "cast<Ty>() argument of incompatible type!"

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Feb 1 06:57:19 PST 2010


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

           Summary: llc crash: "cast<Ty>() argument of incompatible type!"
           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: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu


$ llc gcc37433.ll
llc: llvm/include/llvm/Support/Casting.h:199: typename llvm::cast_retty<To,
From>::ret_type llvm::cast(const Y&) [with X = llvm::Function, Y =
llvm::GlobalValue*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of
incompatible type!"' failed.
...
6  llc       0x0000000000993474 llvm::iplist<llvm::Function,
llvm::ilist_traits<llvm::Function>
>::splice(llvm::ilist_iterator<llvm::Function>, llvm::iplist<llvm::Function,
llvm::ilist_traits<llvm::Function> >&, llvm::ilist_iterator<llvm::Function>) +
0
7  llc       0x0000000000ea342f
llvm::X86TargetLowering::IsEligibleForTailCallOptimization(llvm::SDValue,
llvm::CallingConv::ID, bool, llvm::SmallVectorImpl<llvm::ISD::OutputArg>
const&, llvm::SmallVectorImpl<llvm::ISD::InputArg> const&, llvm::SelectionDAG&)
const + 621
8  llc       0x0000000000e9fee3
llvm::X86TargetLowering::LowerCall(llvm::SDValue, llvm::SDValue,
llvm::CallingConv::ID, bool, bool&, llvm::SmallVectorImpl<llvm::ISD::OutputArg>
const&, llvm::SmallVectorImpl<llvm::ISD::InputArg> const&, llvm::DebugLoc,
llvm::SelectionDAG&, llvm::SmallVectorImpl<llvm::SDValue>&) + 309
9  llc       0x0000000001174328
llvm::TargetLowering::LowerCallTo(llvm::SDValue, llvm::Type const*, bool, bool,
bool, bool, unsigned int, llvm::CallingConv::ID, bool, bool, llvm::SDValue,
std::vector<llvm::TargetLowering::ArgListEntry,
std::allocator<llvm::TargetLowering::ArgListEntry> >&, llvm::SelectionDAG&,
llvm::DebugLoc, unsigned int) + 2538
...


Here's the testcase:

target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

%"char[]" = type [1 x i8]

@.str = external constant %"char[]", align 1      ; <%"char[]"*> [#uses=1]

define i32 @regex_subst() nounwind {
entry:
  %0 = tail call i32 bitcast (%"char[]"* @.str to i32 (i32)*)(i32 0) nounwind ;
<i32> [#uses=1]
  ret i32 %0
}


-- 
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