https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112372
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Giuliano Procida from comment #2) > The symbols are not aliased (which is what I thought might have happened > with very aggressive optimisations). If they had been aliased, it would be > much harder to give the symbols types. They can't alias for language reasons that is `&y != &x` (and `&x != &z`) has to be true. Anyways as mentioned in PR 65797, a thunk is being created and going wrong. Yes maybe ICF should not touch empty functions ... But I doubt that was your original testcase.