For example, if I have the following struct
%struct.foo_struct = type { [3 x i32], i16*, i32}
Let's say we have a pointer %struct.foo_struct* %P.
I know I can do %tmp0 = getelementptr inbounds %struct.foo_struct, %struct.foo_struct* %P, i64 0, i32 0, i64 2 to get the third element in the i32 array of the struct (the first element in the struct), but can I do %tmp1 = getelementptr inbounds %struct.foo_struct, %struct.foo_struct* %P, i64 0, i32 1, i64 2 to get the third element in the i16 array of the struct (the second element in the struct), assuming that the i16 array has at least third elements?
I did not find any posts online discussing the difference between these two types, so can I assume they are the same?