https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97474
--- Comment #8 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- p and p->p are two different pointer objects, the first restricted, so it's not valid to use p->p to access an object that's also accessed via p (and modified). This is different from the case where there is one pointer object but multiple expressions, indirecting through multiple other pointer objects, that refer to it. For that case, of multiple expressions that all end up referring to the same pointer object, see bug 14192 comment 8 where I discuss the rule about "restrict" when pointers to pointers are involved.
