https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574
--- Comment #32 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Ah, but get_alias_set has quite special handling of pointers, it finds the ultimately pointed type and uses TYPE_MAIN_VARIANT for it, so it actually ignores TYPE_CANONICAL of the pointer type itself for TYPE_ALIAS_SET decisions.