https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88775
--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Without the #c11 patch (+ removal of the !INTEGRAL_TYPE_P special case from the above committed change + fixing up ptrs_compare_unequal, or something equivalent like the VRP change) I'm afraid there isn't much possibilities left to do, and those changes are too risky for GCC9. The problem with your testcase is that NRV is in place, so we don't even know if s is an automatic variable or a global variable, or a heap variable etc.