[LLVMdev] LLVM ERROR: Invalid primitive type.. Is this a bug?
Guoliang Jin
jingl1345 at gmail.com
Fri Jul 30 12:28:55 PDT 2010
>> I have:
>> int main()
>> {
>> int i = 1;
>> }
>> in test.c.
>>
>> Then:
>> llvm-gcc -emit-llvm -O0 -c test.c -o test.bc -g
>> llc -march=cpp test.bc
>> gives me:
>> LLVM ERROR: Invalid primitive type
>>
>> This only happens when I use the "-g". Is this a bug?
> Yes, it is a bug. In fact LLVM from subversion from a few days ago
> crashes even without -march=cpp:
>
> $ llc test.bc
> llc: llvm/include/llvm/Support/Casting.h:202: typename llvm::cast_retty<To,
> From>::ret_type llvm::cast(const Y&) [with X = llvm::MDNode, Y = llvm::Value*]:
> Assertion `isa<X>(Val)&& "cast<Ty>() argument of incompatible type!"' failed.
>
> Please open a bugreport at http://llvm.org/bugs
Reported at http://llvm.org/bugs/show_bug.cgi?id=7761
More information about the llvm-dev
mailing list