[LLVMdev] Can't bootstrap llvm-gcc-4.0 for x84_64
dag at cray.com
Thu Oct 11 11:24:30 CDT 2007
On Thursday 11 October 2007 02:39, Duncan Sands wrote:
> Hi David,
> > "LLVM type size doesn't match GCC type size!"' failed.
> this assertion checks that gcc types are converted into
> LLVM types of the same size. Try running cc1 in gdb.
> When you hit the assertion, go up a few stack frames
> until you get to ConvertType. Do
> call debug_tree(type)
> That will tell you what the gcc type was. From that
> and the LLVM type it should be clear what the ultimate
> cause of the problem was.
Ok, I think this must be related to the warning about 64-bit code.
debug_type reveals the gcc type to be a function pointer of size
32, which would indicate 32-bit code. The llvm type is PointerTyID
of size 64, indicating 64-bit code.
This happens at line 796 of llvm-types.cpp:
if (Ty->getTypeID() == Type::VoidTyID)
Ty = Type::Int8Ty; // void* -> sbyte*
return TypeDB.setType(type, PointerType::get(Ty));
Somehow PointerType::get is returning a 64-bit pointer even though
-m32 was passed to llvm-gcc.
I'll see if I can figure out where the 64-bit code warning is emitted and
what triggers it.
More information about the LLVMdev