https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106716
--- Comment #2 from Tomer Vromen <tomerv at gmail dot com> --- IMO, attribute information should be checked in this optimization stage, so that ipa-icf knows the functions are different. It seems like maybe this is already partially the behavior - removing the attribute from one of the functions makes them different again after ipa-icf. Maybe the existence of the attribute is considered, but not its value? There's some code in sem_item::compare_referenced_symbol_properties() that looks like it's trying to do this.