https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94299
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> --- So I was able to reproduce the problem but I don't see what exactly happens there. Note that -O2 is needed in order to process inlining and further optimizations. I bet it's an issue in the code itself. Feel free to send a reduced-testcase: https://gcc.gnu.org/wiki/HowToPrepareATestcase