https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71071
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> --- Calling get_alias_set cannot be avoided here, it eventually gets called via reference_alias_ptr_type->component_uses_parent_alias_set_from. So the solution is to excempt TYPE_ALIAS_SET from the hashing.