https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574
--- Comment #33 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #32) > 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. Yes because you need to ignore all the qualifiers on the pointed to types. Otherwise you end up with `const int*const*` and `int**` have not the same aliasing set.