[LLVMbugs] [Bug 1087] NEW: Assertion failure in llvm-internal.h

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Jan 6 18:19:04 PST 2007


           Summary: Assertion failure in llvm-internal.h
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-g++
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: babic.domagoj at gmail.com

$:~/tmp$ llvm-g++ -I/work/benchmarks/SOURCES/llvm-1.9/utils/TableGen
-I/work/benchmarks/SOURCES/llvm-1.9/include -D__STDC_LIMIT_MACROS
CodeEmitterGen.cpp -o /dev/null
cc1plus: ../../dst-directory/gcc/llvm-internal.h:305: llvm::Value*
TreeToLLVM::NOOPCastToType(llvm::Value*, const llvm::Type*): Assertion
`isNoopCast(V, Ty) && "This is not a noop cast!"' failed.
CodeEmitterGen.cpp: In member function ‘int
llvm::CodeEmitterGen::getVariableBit(const std::string&, llvm::BitsInit*, int)’:
CodeEmitterGen.cpp:5: internal compiler error: Aborted
Please submit a full bug report,

Reduced testcase:
#include "CodeEmitterGen.h"
#include "Record.h"

using namespace llvm;
int CodeEmitterGen::getVariableBit(const std::string &VarName, BitsInit *BI, int
bit) {
    if (VarBitInit *VBI = dynamic_cast<VarBitInit*>(BI->getBit(bit))) {

Reproducible with:
llvm-g++ -I<path_to_llvm1.9_source>/llvm-1.9/utils/TableGen
-I/<path_to_llvm1.9_source>/llvm-1.9/include -D__STDC_LIMIT_MACROS
CodeEmitterGen.cpp -o /dev/null

My version of llvm-internal.h:
Path: llvm-internal.h
Name: llvm-internal.h
URL: svn://anonsvn.opensource.apple.com/svn/llvm/trunk/gcc/llvm-internal.h
Repository Root: svn://anonsvn.opensource.apple.com/svn/llvm
Repository UUID: 51af6f4a-8115-0410-a7cd-c0d7a57f2c62
Revision: 224
Node Kind: file
Schedule: normal
Last Changed Author: jlaskey
Last Changed Rev: 223
Last Changed Date: 2006-12-07 01:03:52 -0800 (Thu, 07 Dec 2006)
Text Last Updated: 2006-12-09 13:16:41 -0800 (Sat, 09 Dec 2006)
Properties Last Updated: 2006-12-09 13:16:18 -0800 (Sat, 09 Dec 2006)
Checksum: b161d41397e225913a087e5b75ec1335


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list