“…The idea behind the new representation was to address existing limitations by giving the TBAA accurate information about accesses. If memory servers me, in this specific case of an unknown index, the tag shall refer to the whole member array, which is supposed to mean that all and any of its elements can actually be accessed.”
So what about this case https://godbolt.org/z/xFC4Rp :
struct S {
int a[256];
int b;
};
int f(struct S *p, unsigned char i) {
if (p->b)
return42;
p->a[i] = 3;
return p->b;
}
“p->b” is re-read althoug the index “i” cannot acces beyond the array boundary. What went wrong here?
Thanks,
Alex.