https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103168
--- Comment #13 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Concerning comment #10, the problem was that the loop walking all accesses was missing loads->every_base check. This is used to represent that we track no useful info about loads performed at all. Anyway if I read the code correctly, it does nothing useful if the access tree contains any access for which we can not construct ref and thus one can simply check global_memory_access and do not care about every_base/every_ref/every_access since these must be all false. I simplified the walk a bit and added code pre-computing number of accesses in the tree into the summary. What we can also do is, when hitting access for which we can not construct ref, or when hitting every_ref/every_acccess, is to construct ref with base_alias_set/ref_alias_set as given by the access tree but with base=NULL, offset=0 and size=max_size=-1. This should still let the basic TBAA oracle to disambiguate.