https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64860
--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> --- (just to explain bit more - the main difference between static and dynamic linking here is that dynamic linking never remove any definition and thus you can dissolve comdat groups)