[LLVMbugs] [Bug 1921] New: clang fails with: Assertion `Ty && " Invalid GetElementPtrInst indices for type!"'

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jan 18 02:41:08 PST 2008


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

           Summary: clang fails with: Assertion `Ty && "Invalid
                    GetElementPtrInst indices for type!"'
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=1339)
 --> (http://llvm.org/bugs/attachment.cgi?id=1339)
delta reduced testcase

Using clang r46160, llvm r46160, codegen fails for attached reduced testcase

$ clang -emit-llvm-bc matcher-bm.i
clang: /home/edwin/llvm-svn/llvm/include/llvm/Instructions.h:374: const
llvm::Type* llvm::checkType(const llvm::Type*): Assertion `Ty && "Invalid
GetElementPtrInst indices for type!"' failed.
clang[0x65292b]
/lib/libc.so.6[0x363d232090]
/lib/libc.so.6(gsignal+0x35)[0x363d232025]
/lib/libc.so.6(abort+0x110)[0x363d233a80]
/lib/libc.so.6(__assert_fail+0xef)[0x363d22b42f]
clang(llvm::GetElementPtrInst::GetElementPtrInst(llvm::Value*, llvm::Value*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&,
llvm::Instruction*)+0x180)[0x5d1f90]
clang[0x4be233]
clang[0x4c23f7]
clang[0x4c076c]
clang(clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr
const*)+0x58)[0x4c1478]
clang(clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt
const&, bool, llvm::Value*, bool)+0x71)[0x4c69f1]
clang(clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*)+0x2a5)[0x4c4e45]
clang(clang::CodeGen::CodeGenFunction::EmitIfStmt(clang::IfStmt
const&)+0x17a)[0x4c66da]
clang(clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt
const&, bool, llvm::Value*, bool)+0x71)[0x4c69f1]
clang(clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*)+0x2a5)[0x4c4e45]
clang(clang::CodeGen::CodeGenFunction::EmitWhileStmt(clang::WhileStmt
const&)+0x187)[0x4c6337]
clang(clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt
const&, bool, llvm::Value*, bool)+0x71)[0x4c69f1]
clang(clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*)+0x2a5)[0x4c4e45]
clang(clang::CodeGen::CodeGenFunction::EmitIfStmt(clang::IfStmt
const&)+0x17a)[0x4c66da]
clang(clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt
const&, bool, llvm::Value*, bool)+0x71)[0x4c69f1]
clang(clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*)+0x2a5)[0x4c4e45]
clang(clang::CodeGen::CodeGenFunction::EmitForStmt(clang::ForStmt
const&)+0x211)[0x4c5cd1]
clang(clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt
const&, bool, llvm::Value*, bool)+0x71)[0x4c69f1]
clang(clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*)+0x2a5)[0x4c4e45]
clang(clang::CodeGen::CodeGenFunction::GenerateCode(clang::FunctionDecl
const*)+0x2ed)[0x4ae5ed]
clang(clang::CodeGen::CodeGenModule::EmitFunction(clang::FunctionDecl
const*)+0x33)[0x4a48d3]
clang(clang::ParseAST(clang::Preprocessor&, clang::ASTConsumer*,
bool)+0x3f8)[0x4e5fd8]
clang[0x49b009]
clang(main+0x9fa)[0x4a0cfa]
/lib/libc.so.6(__libc_start_main+0xf4)[0x363d21e1c4]
clang[0x481589]
Aborted

$ clang --version
Low Level Virtual Machine (http://llvm.org/):
  llvm version 2.3svn
  Optimized build with assertions.

$ uname -a
Linux lightspeed2 2.6.24-rc6-ge697789d #3 Wed Jan 2 11:15:05 EET 2008 x86_64
GNU/Linux


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