[Bug middle-end/71062] [7 regression] r235622 and restrict pointers

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Wed May 11 17:43:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71062

--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
I don't think it's valid to optimize for comparisons, where dereference 
doesn't occur, based on restrict; restrict is only about how an object is 
accessed (and as long as the object doesn't get modified, multiple 
pointers, restricted and otherwise, can be used to access it; it's only if 
the object is modified[*] that the rules about restrict come into play).

[*] Including the deemed modifications from "Every access that modifies X 
shall be considered also to modify P, for the purposes of this subclause." 
to deal with multiple levels of restricted pointers.


More information about the Gcc-bugs mailing list