https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68640
--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- The definition of restrict allows for new temporaries. If you do "q = p + 1;", then thereafter q is based on p. (If you do assignments between restricted pointer objects, you also need to follow the rules for those.)