Upstream bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107678 V2 of patches is: https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609356.html