[Bug tree-optimization/97474] [8/9/10/11 Regression] produces wrong code with references to another field
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Mon Oct 19 21:32:30 GMT 2020
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.
More information about the Gcc-bugs
mailing list