https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92606
--- Comment #29 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:eee13a3730bd1d7aa7b40687b1ee49c17d95159f commit r14-6458-geee13a3730bd1d7aa7b40687b1ee49c17d95159f Author: Richard Biener <rguent...@suse.de> Date: Mon Dec 11 10:08:24 2023 +0100 ipa/92606 - properly handle no_icf attribute for variables The following adds no_icf handling for variables where the attribute was rejected. It also fixes the check for no_icf by checking both the source and the targets decl. PR ipa/92606 gcc/c-family/ * c-attribs.cc (handle_noicf_attribute): Also allow the attribute on global variables. gcc/ * ipa-icf.cc (sem_item_optimizer::merge_classes): Check both source and alias for the no_icf attribute. * doc/extend.texi (no_icf): Document variable attribute.