https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70582
--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Does this still reproduce? I have implemented the optimization that removes weakrefs with definition provided in other unit so this may be solved/hidden by it.