int %main(int %argc, sbyte** %argv) {
%z = malloc uint, uint 10
%g = call uint %fie(uint* %z)
ret int 0
}
But the getelementptr instruction gives a segmentation fault. Have I
misunderstood its use? I get segmentation faults when I try to compile it
as well.
Hmm, ok. I'm using the 1.2 release. Found out that it worked when using
long to index getelementptr, but not when using uint, int or ulong. But
then I'll try with the CVS code instead. Thank you.
Hmm, ok. I'm using the 1.2 release. Found out that it worked when using
long to index getelementptr, but not when using uint, int or ulong. But
then I'll try with the CVS code instead. Thank you.
, Tobias
Yes. I guess I should have noticed that. One of the changes in 1.3 is
that you access structures with uint instead of ubyte (as in 1.2) while
accessing arrays is still with longs. The type of the index in both
releases is used to disambiguate between structure and array accesses.
So, for your 1.2 release, please make sure to use long for arrays and
ubyte for structures. When you move to CVS head or 1.3 release (when it
happens), you'll need to use uint to index structures.