https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77333
--- Comment #10 from Martin Jambor <jamborm at gcc dot gnu.org> --- Interesting to see stack issues after IPA-CP changes. Please try compiling with -fno-devirtualize If it does not help, try -fno-ipa-cp (or both). If any of the above does help, adding it to just the file in which the miscompiled function is should help, so please verify that. If devirtualization causes the weird behavior, trying what -fsanitize-undefined-trap-on-error does might also shed some light on it. After we have identified the miscompiled source file and confirmed that an IPA option causes it, we may try to minimize the testcase or inspect dumps (-fump-tree-release_ssa -fdump-ipa-all-details -fdump-tree-fixup_cfg4) for suspect behavior. Also, we will need to confirm this is indeed a compiler bug and not source code with undefined behavior.