https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105600
--- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Martin Liska <mar...@gcc.gnu.org>: https://gcc.gnu.org/g:c600ff8dc5a870d952c9c63fe4fa4535b9f0a488 commit r12-8509-gc600ff8dc5a870d952c9c63fe4fa4535b9f0a488 Author: Martin Liska <mli...@suse.cz> Date: Wed May 18 15:07:53 2022 +0200 ipa-icf: skip variables with body_removed Similarly to cgraph_nodes, it may happen that body_removed is set during merging of symbols. PR ipa/105600 gcc/ChangeLog: * ipa-icf.cc (sem_item_optimizer::filter_removed_items): Skip variables with body_removed. (cherry picked from commit 31ce821a790caec8a2849dd67a9847e78a33d14c)