https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120098
--- Comment #32 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:04e111ae72a6b4ced48c733e9043d6efbe92d3b6 commit r15-11241-g04e111ae72a6b4ced48c733e9043d6efbe92d3b6 Author: Jan Hubicka <[email protected]> Date: Fri Apr 17 18:10:09 2026 +0200 Fix lto-devirt-23.C testcase failure The testcase now fails because we miss the fact that type can be in construction. This is because polymorphic_ctor_dtor_p returns false on polymorphic destructor since it has PURE flag. The problem is that the destructor is optimized in meantime and the memory store is optimized out. It is however left intact in the inline copy of the constructor, so we can't really use the flag. This check was added during early stage of the development of ipa-devirt and it is not very effective (does not trigger anything useful on testsuite or GCC bootstrap). So this patch simply drops it. gcc/ChangeLog: PR ipa/120098 * ipa-polymorphic-call.cc (polymorphic_ctor_dtor_p): Remove check for pure/const flags (cherry picked from commit 1cfd37290199bd69706d5a74d4cee40bd83d671c)
