In the following case, pointer addoff calculate by "&x.q + off" may have a chance alias to x.p structure member.
struct X {
int *p;
int *q;
};
int foo(int i, int j, int off)
{
struct X x;
int **t, *addoff;
x.p = &i;
x.q = &j;
t = &x.q;
t += off;
addoff = *t;
return *addoff;
}
*indices.
You should probably fix the big block comment as well; "we can't count on the constant offsets that come from non-struct sources" isn't an accurate description of the LangRef rules for GEPs.