https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106590
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Fixed on the trunk so far, 12.2 is frozen now and I think the fix needs some time on the trunk before backporting, so probably only will be fixed for 12.3.