https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97474
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jsm28 at gcc dot gnu.org
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the C standard isn't explicit here but if I read "based on" as "a pointer
q is based on p if adjusting p changes q" then it's based on. If the
change to q is supposed to be the same as the change to p then this case
wouldn't be covered. Joseph? C testcase:
struct S { int a; int *p; };
int foo (struct S * restrict p)
{
p->a = 1;
p->p->b = 2;
return p->a;
}
int main()
{
struct S s;
s.p = &s.a;
if (foo (&s) != 2)
abort ();
}
so can S->p point to S->a in foo()?