OK, I now see how the i32 0 moves inside the struct. But now I have more
questions. According to "The Often Misunderstood GEP Instruction", the
type given to GEP as type of the starting pointer value need not be the
same as the type the value had when it was produced. Yet you say it would
not typecheck as I miscorrected. So, I am guessing the following:
1) In order to change the type in this way, I would need to insert an
2) Even though I can change the type, it still must be a pointer type
(I see the language reference says this.) So even with an explicit
bitcast, my miscorrected example would still fail to typecheck for
this latter reason.
3) The result of GEP is always a pointer type, the same as the starting
type if only one index is given, different otherwise.
Am I understanding correctly?