https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88490
--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> --- On Fri, 14 Dec 2018, bugzi...@poradnik-webmastera.com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88490 > > --- Comment #3 from Daniel Fruzynski <bugzi...@poradnik-webmastera.com> --- > In this case s->d is pointer to pointer to double, and both pointer levels > have > restrict qualifier. I wonder if you could add some tag that s->d[n] and > s->d[k] > points to separate memory areas. This tag could be later used to determine > that > s->d[n][0] and s->d[k][0] also do not overlap. Not easily. Consider the loads being hoisted before the if (k > n) check for example. Note I do not think the C standard is sufficiently clear with regarding to restrict qualified pointers loaded from memory. Clearly s->d[n][0] and s->d[n][0] alias but they are not based on each other.