https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92606
--- Comment #4 from Georg-Johann Lay <gjl at gcc dot gnu.org> --- The problem is that there isn't even a target hook to disallow such optimizations, files as as PR92932. In a respective hook, at least the attributes and address spaces of either object must be available.