http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58806
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> --- Created attachment 31074 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31074&action=edit experimental patch This optimizes the testcase in comment #0 if I mark g with the attribute "no_global_write" and use some way of marking g's argument as EAF_DIRECT. Maybe it would be easier to have the no_global_write attribute (possibly with a different name) imply EAF_DIRECT on the arguments, as it gets tricky trying to see what we may alias by following an arbitrary chain starting at a given pointer.