https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98190
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Perhaps some of those checks on the other side are redundant and could be turned e.g. into gcc_checking_assert of gcc_assert, I bet if the MEM_REF doesn't overwrite all bits, but only some subset of them, then the destination couldn't be a nonmem decl and thus couldn't be promoted.