Guoliang Jin
2010-Jul-29 05:57 UTC
[LLVMdev] LLVM ERROR: Invalid primitive type.. Is this a bug?
Hi, 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? Thanks, Guoliang
Duncan Sands
2010-Jul-29 07:36 UTC
[LLVMdev] LLVM ERROR: Invalid primitive type.. Is this a bug?
> 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 Ciao, Duncan.
Guoliang Jin
2010-Jul-30 19:28 UTC
[LLVMdev] LLVM ERROR: Invalid primitive type.. Is this a bug?
>> 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/bugsReported at http://llvm.org/bugs/show_bug.cgi?id=7761
Reasonably Related Threads
- [LLVMdev] LLVM ERROR: Invalid primitive type.. Is this a bug?
- Problems with Inline ASM expressions generated in the back end
- [LLVMdev] Assertion: replaceAllUses of value with new value of different type! being thrown all of a sudden
- [LLVMdev] type-system-rewrite branch landing tomorrow
- [LLVMdev] type-system-rewrite branch landing tomorrow